I can iterate through nodes using the MS XML DOC, evaluating node by node, however, how can I return a specific nodes value inside of an XML element. For instance,
I receive a document with 1 or more orders
I receive a document with 1 or more orders
Code:
<ReceivedOrders>
<order>
<customername>Joe Smith</customername>
<Items>
<Item>
<name>A product</name>
<price>2.95</price>
<quantity>2</quantity>
</item>
<item>
<name>another product</name>
<price>10.00</price>
<quantity>1</quantity>
</item>
</Items>
</order>
<orders>
<customername>Joe Smith</customername>
<Items>
<Item>
<name>A product</name>
<price>2.95</price>
<quantity>2</quantity>
</item>
<item>
<name>another product</name>
<price>10.00</price>
<quantity>1</quantity>
</item>
</Items>
</order>
</ReceivedOrders>
[code]
I would like to, return the number of <order> elements in a <ReceivedOrders> block and the number of <items> within a specific <order> block.
I would like to return the customer name from any given <order> block - for instance. I can iterate through, just can't seem to return a particular element's value from a particular block?
Am I making sense?
Thanks.
Matthew Moran
Read my career blog at: [URL unfurl="true"]http://www.cbtoolkit.com[/URL]
Career Blog: [URL unfurl="true"]http://blogs.ittoolbox.com/pm/career/[/URL]
[i]Todo esta bien.. Todo esta divertido (it's all good, it's all fun)[/i]