You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
827 B
33 lines
827 B
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading.Tasks; |
|
using System.Xml; |
|
using System.Xml.XPath; |
|
using System.IO; |
|
using Wmhelp.XPath2; |
|
|
|
namespace XmlTest |
|
{ |
|
class Program |
|
{ |
|
static void Main(string[] args) |
|
{ |
|
XmlDocument xDoc = new XmlDocument(); |
|
xDoc.Load("..\\..\\..\\vertical.xml"); |
|
XmlElement xRoot = xDoc.DocumentElement; |
|
|
|
|
|
|
|
XmlNodeList childnodes = xRoot.XPath2SelectNodes("//Object[ends-with(@Name,'_oper')]"); |
|
if (childnodes != null) |
|
foreach (XmlNode n in childnodes) |
|
Console.WriteLine(n.SelectSingleNode("Attribute").OuterXml); |
|
|
|
Console.WriteLine("Press Any Key"); |
|
Console.ReadKey(); |
|
|
|
} |
|
} |
|
}
|
|
|