diff --git a/XmlTest/Program.cs b/XmlTest/Program.cs index 5a43abf..682e261 100644 --- a/XmlTest/Program.cs +++ b/XmlTest/Program.cs @@ -18,13 +18,30 @@ namespace XmlTest xDoc.Load("..\\..\\..\\vertical.xml"); XmlElement xRoot = xDoc.DocumentElement; - - XmlNodeList childnodes = xRoot.XPath2SelectNodes("//Object[ends-with(@Name,'_oper')], //Object[ends-with(@Name,'_step')]"); - if (childnodes != null) - foreach (XmlNode n in childnodes) + + XmlNodeList mySearch = xRoot.XPath2SelectNodes("//Object[ends-with(@Name,'_oper')]"); + if (mySearch != null) + foreach (XmlNode n in mySearch) + { + Console.WriteLine(n.SelectSingleNode("Attribute").OuterXml); + + } + + + + //XmlNodeList childnodes = xRoot.XPath2SelectNodes("//Object[ends-with(@Name,'_oper')], //Object[ends-with(@Name,'_step')]"); + //if (childnodes != null) + // foreach (XmlNode n in childnodes) + // { + // Console.WriteLine(n.SelectSingleNode("Attribute").OuterXml); + + // foreach (XmlNode s in n) + // Console.WriteLine + // } + Console.WriteLine("Press Any Key"); Console.ReadKey();