Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How to get to certain elements using an XML file

$
0
0

I have an XML file which has data similar to the below output

<soap:envelope....<soap:Header...

removed for brevity

	</soap:Header><soap:Body><Response xmlns="http://www.site.com"><Result><Info><string>XXxxXXxx</string></Info><Results><ResultOne><Details><SingleDetail><Name>Bob</Name><Address>Alberon Road</Address><Country>USA</Country><TimeFrame>2 Hours</TimeFrame><StartDate><NewElement>

So i wrote some code to get to the Resultssection

Dim node As XmlNode = XmlDoc.GetElementsByTagName("Results").Item(0)

For Each i as ItemNode In node.ChildNodes

msgBox.Show(i.innertext)

Next

This shows everything but how could i extract the elements i.e. name, address etc and then go to ResultsTwo (above shows only ResultOne)

Thanks 


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>