-
Check XML node is exists:
-
tmpDoc.Load(filePath);
-
XmlNode rootNode = tmpDoc.SelectSingleNode("Controls");
-
-
XmlNodeList slblNodeList = null;
-
if (rootNode.SelectSingleNode("SmartLabels") != null)
-
slblNodeList = rootNode.SelectSingleNode("SmartLabels").ChildNodes;
-
rootNode.SelectSingleNode("SmartLabels") != null这一句很有用!!!
Reference Website:
阅读(2390) | 评论(0) | 转发(0) |