Help with reading and saving XML file

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
can someone please help me with reading the fillowing xml document and saving the data in a table.
The header table shuld save the details of all elemnets except the item elements and the ItemIn and its child nodes must be saved in the child table. How can we loop with in the ItemIn element to get all the child nodes and save them along with the header
detail.
need help with code in c Sharp.
<?xml version=1.0 encoding=UTF-8 ?>
<cXML version=1.2.011 payloadID=2010-03-17 14:44:22Z timestamp=2010-03-17 14:44:22Z>
<Header><From><Credential domain=DUNS><Identity>help@iaesc.org</Identity></Credential></From><To><Credential domain=NetworkUserId><Identity></Identity></Credential></To><Sender><Credential
domain=NetworkUserId><Identity>IDENTITY</Identity><SharedSecret>PASSWORD</SharedSecret></Credential><UserAgent>Wilson cXML Agent 0.2</UserAgent></Sender></Header><Message deploymentMode=production><PunchOutOrderMessage><BuyerCookie>23b6390f92e7464cb3aed44ec6628505</BuyerCookie><PunchOutOrderMessageHeader
operationAllowed=edit quoteStatus=final><Total><Money currency=USD>135.8</Money></Total> </PunchOutOrderMessageHeader>
<ItemIn quantity=10><ItemID><SupplierPartID>1010066436</SupplierPartID><SupplierPartAuxiliaryID></SupplierPartAuxiliaryID></ItemID><ItemDetail><UnitPrice><Money currency=USD >13.58</Money></UnitPrice><Description
xml:lang=en >20 Sheets Capacity - 210 Staple Capacity - 1/4&quot; Staple Size - Black</Description><UnitOfMeasure>EA</UnitOfMeasure>
<Classification domain=SPSC >unknown</Classification><Extrinsic name=VendorID >0</Extrinsic><Extrinsic name=Sku >SWI64601
</Extrinsic></ItemDetail></ItemIn>
<br/>
<ItemIn quantity=10><ItemID><SupplierPartID>101006</SupplierPartID><SupplierPartAuxiliaryID></SupplierPartAuxiliaryID></ItemID><ItemDetail><UnitPrice><Money currency=USD >2.5</Money></UnitPrice><Description
xml:lang=en >Paper - Multipurpose</Description><UnitOfMeasure>CA</UnitOfMeasure>
<Classification domain=SPSC >unknown</Classification><Extrinsic name=VendorID >0</Extrinsic><Extrinsic name=Sku >SWI64601
</Extrinsic></ItemDetail></ItemIn>
</PunchOutOrderMessage></Message>
</cXML>

View the full article
 
Back
Top