Hi all, I need urgent help with an xml issue. Let me explain the scenario:
My VB.NET app needs to read an xml (e.g. Sales Orders). This xml contains say 10 sales orders. Next the app needs to split the original xml into 10 individual SalesOrder xml files, each file containing a single sales order. The xml files created must be created based on a set xsd schema.See example below:
Here I have 2 sales orders in my original xml, I want to create 1 xml file for each Sales order.
e.g. <Sales Order>
<DocNum>"1234"</DocNum>
<ItemCode>"321"</ItemCode>
<DocDate>20070215</DocDate>
<Qty>1</Qty>
<Amount>$1500.00</Amount>
</Sales Order>
<Sales Order>
<DocNum>"1234"</DocNum>
<ItemCode>"321"</ItemCode>
<DocDate>20070215</DocDate>
<Qty>1</Qty>
<Amount>$1500.00</Amount>
</Sales Order>
Here are list of my issues:
1) Easier way to extract individual SalesOrders from the original xml: I can extract the inner text of all e.g. "DocNum" nodes in the original xml etc, but there must an easier way to extract all the childnodes inner text per SalesOrder node. (i.o.w. DocNum,ItemCode,DocDate,Qty,Amount together)
2) How to write the extracted xml information into an xml file based on a provided xsd file/schema.
I've been strugling for a week to find clear information on this and have been unsuccesfull thus far.
Any help would be greatly appreciated!
Thank you for your time