Export Data From Excel To XML With List Of Lists

angsuman

New Member
Joined
Aug 19, 2015
Messages
30
Hi All,

I am trying to export data from excel to xml. The xml has list of lists. I tried searching several document but could not find a solution. Request your help on this.

Following is my excel file:

HTML:
<?xml version="1.0" encoding="UTF-8"?><root>    <scheduling>        <scheduling_id>ABCD</scheduling_id>        <scheduling_plan>            <day>                <value>1</value>                <time_slot_plan>                    <time>9AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>                <time_slot_plan>                    <time>10AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>			</day>            <day>                <value>2</value>                <time_slot_plan>                    <time>9AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>                <time_slot_plan>                    <time>10AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>			</day>			        </scheduling_plan>    </scheduling>    <scheduling>        <scheduling_id>DEFAULT</scheduling_id>        <scheduling_plan>            <day>                <value>1</value>                <time_slot_plan>                    <time>9AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>                <time_slot_plan>                    <time>10AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>			</day>            <day>                <value>2</value>                <time_slot_plan>                    <time>9AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>                <time_slot_plan>                    <time>10AM</time>                    <time_slot_percentage>50</time_slot_percentage>                    <threshold>40000</threshold>                </time_slot_plan>			</day>			        </scheduling_plan>    </scheduling>	</root>

Using above xml, I have created following xsd:

HTML:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">  <xs:element name="root">    <xs:complexType>      <xs:sequence>        <xs:element name="scheduling" maxOccurs="unbounded" minOccurs="0">          <xs:complexType>            <xs:sequence>              <xs:element type="xs:string" name="scheduling_id"/>              <xs:element name="scheduling_plan">                <xs:complexType>                  <xs:sequence>                    <xs:element name="day" maxOccurs="unbounded" minOccurs="0">                      <xs:complexType>                        <xs:sequence>                          <xs:element type="xs:byte" name="value"/>                          <xs:element name="time_slot_plan" maxOccurs="unbounded" minOccurs="0">                            <xs:complexType>                              <xs:sequence>                                <xs:element type="xs:string" name="time"/>                                <xs:element type="xs:byte" name="time_slot_percentage"/>                                <xs:element type="xs:int" name="threshold"/>                              </xs:sequence>                            </xs:complexType>                          </xs:element>                        </xs:sequence>                      </xs:complexType>                    </xs:element>                  </xs:sequence>                </xs:complexType>              </xs:element>            </xs:sequence>          </xs:complexType>        </xs:element>      </xs:sequence>    </xs:complexType>  </xs:element></xs:schema>

Thanks
Angsuman
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top