Hi! I'm not yet that familliar with the Xml namespace, but have been
fooling around with GetElementsByTagName, ChildNodes and InnerText. I'm
wondering how others would approach extracting values out of this XML (see
below).
Basically, I need to extract all of the <code> values below as well as the
<status>, <transaction-id> and <time-stamp> values.
It seems to me that the most intuitive way of accomplishing this is by being
able to specify the path to each value I'm interested in. Something like
(warning: this is made up):
xmlDoc.Elements("message/record/vin/code").Value
xmlDoc.Elements("message/record/bill/address_current/code").Value
Is there a way to access the XML document this way?? If not, any other
suggestions are appreciated.
Thanks in advance!
Ben
<?xml version="1.0" encoding="UTF-8" ?>
<message>
<status>0</status>
<record>
<transaction-id>11</transaction-id>
<time-stamp>11/13/04 1:10 pm</time-stamp>
<vin>
<code>1</code>
<text>positive</text>
</vin>
<phone>
<code>1</code>
<text>positive</text>
</phone>
<bill>
<code>1</code>
<text>positive</text>
<address_current>
<code>1</code>
<text>positive</text>
</address_current>
</bill>
</record>
</message>