H
Hardy Wang
Guys,
I have following piece of XML file,
<?xml version="1.0"?>
<SiteSettings>
<PageSettings>
<Image1 source="dlr" type="jpg">
<url source="dlr">http://www.hotmail.com</url>
<newwindow source="dlr">yes</newwindow>
</Image1>
</custom_awards>
</PageSettings>
</SiteSettings>
I have following code to load this XML file
string xmlKey = "SiteSettings/PageSettings/custom_awards/Image1/url";
XmlDocument dlrProductionXDoc = new XmlDocument();
dlrProductionXDoc.Load(@"c:\temp\test.xml");
XmlNode xNode1 = dlrProductionXDoc.SelectSingleNode(xmlKey);
I read the HasChildNodes of this "url" node, but the value is true, even
though there is no more nodes under it. From quick watch, its LastChild's
name is "#text" .
How can I detect if a node is the last level of nodes (no more children)?
I have following piece of XML file,
<?xml version="1.0"?>
<SiteSettings>
<PageSettings>
<Image1 source="dlr" type="jpg">
<url source="dlr">http://www.hotmail.com</url>
<newwindow source="dlr">yes</newwindow>
</Image1>
</custom_awards>
</PageSettings>
</SiteSettings>
I have following code to load this XML file
string xmlKey = "SiteSettings/PageSettings/custom_awards/Image1/url";
XmlDocument dlrProductionXDoc = new XmlDocument();
dlrProductionXDoc.Load(@"c:\temp\test.xml");
XmlNode xNode1 = dlrProductionXDoc.SelectSingleNode(xmlKey);
I read the HasChildNodes of this "url" node, but the value is true, even
though there is no more nodes under it. From quick watch, its LastChild's
name is "#text" .
How can I detect if a node is the last level of nodes (no more children)?