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.

<Details>
    <NodeCount>24</NodeCount>
    <Node_x0020_Name>c002n02</Node_x0020_Name>
    <Status>online</Status>
    <Total_x0020_Raw_x0020_Capacity_x0020__x0028_MB_x0029_>3815478.75</Total_x0020_Raw_x0020_Capacity_x0020__x0028_MB_x0029_>
    <Free_x0020_Raw_x0020_Capacity_x0020__x0028_MB_x0029_>139932.75</Free_x0020_Raw_x0020_Capacity_x0020__x0028_MB_x0029_>

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

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

<Free_x0020_Raw_x0020_Capacity_x0020__x0028_MB_x0029_>134347.59</Free_x0020_Raw_x0020_Capacity_x0020__x0028_MB_x0029_>

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.