Trying to access an xml value of Child

I have an XML file with the following lines. I am able to navigate just fine but I can not access this value.


If I use the the xChild(4).Value I get nothing

If I use the the xChild(4).ToString I get the entire line.


while I am just looking for the value 134347.59. Any thoughts.

That value is actually in the XmlTextNode that is the child of the node that you currently have in xChild(4). To get the value, you need xChild.(4).FirstChild.Value.

Bingo! that worked, did not dawn on me the value is a child. I thought there was a direct way to access child nodes directly. I guess you can’t you have to recurse through each level to find what you need.

just put a break in the debugger, and explore the xml nodes with it, to get the value you need.