Hi,
I'm working on a program which reads xml files and list all tags and their corresponding child fields which will be used to compare against the table and columns created in database.
Could anyone please help in listing tags and field names from xml file.
Input XML File:
<ordering>
<order>
<orderNumber>316</orderNumber>
<OrderName>MOBILE</OrderName>
<BusinessType>COMMERCIAL</BusinessType>
<OrderStatus>PENDING</OrderStatus>
<shipto>
<name>Ola Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
<country>Norway</country>
</shipto>
<item>
<title>Empire Burlesque</title>
<note>Special Edition</note>
<quantity>1</quantity>
<price>10.90</price>
</item>
</order>
<ordering>
Output ( It can be inserted into table, if required )
TagName FieldName
ordering NULL
order orderNumber
order OrderName
order BusinessType
order OrderStatus
shipto name
shipto address
shipto city
shipto country
item title
item note
item quantity
item price
Thanks and Regards,
Lokesh