You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Hi - I have a complex XML file and am using XMLDOM to retrieve it's values.
I have all <CONTACT> elements being retrieved in a list. I want to loop thru that list and retrieve various sub-elements (such as name, phone, email). I can loop thru and get the element name, but for some reason I can't get the value. nodeValue doesn't retrieve anything and .Text seems to retrieve too much. It's a big long string (possibly holding the text from all descendants too?)
You are exactly correct!
I was just sending my code in an email to someone and noticed that my .text call was on the Node and not the element ... this is why I got the big list of values.