xml parsing issue

Bill McManus

New member
Joined
Sep 7, 2009
Messages
1
Location
Ann Arbor, MI
Programming Experience
10+
I'm using the xpath node iterator to move through an xml files and extract the data I need but I'm having problems when the node is setup like the following:

<dep-gender>
<Female />
</dep-gender>

I'm not sure why the element isn't just:

<dep-gender> Female</dep-gender>

But it is what it is.

Does anyone know a way of getting the node iterator to read the dep-gender node as Female?
 
VB.NET:
Dim xl As New XMLDocument
xl.Load("yourXmlFile")
Dim node As XmlNode = xl.DocumentElement.SelectSingleNode("dep-gender")
For Each gender As XmlNode In node.ChildNodes
'gender.Name will get you the name of the element
Next
 
Back
Top