From f273d81ebe1211e7104a65fba6eed776911240ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=95=D1=80=D0=BC=D0=BE=D1=85?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Wed, 25 Jul 2018 20:30:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B7=D0=BE=D0=B2=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D1=8B=20=D0=BF=D0=BE=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D1=80=D0=BE=D0=B2=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XmlTest/Program.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/XmlTest/Program.cs b/XmlTest/Program.cs index 682e261..5b3bf86 100644 --- a/XmlTest/Program.cs +++ b/XmlTest/Program.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Xml; using System.Xml.XPath; using System.IO; +using System.Xml.Linq; using Wmhelp.XPath2; namespace XmlTest @@ -30,7 +31,21 @@ namespace XmlTest } + foreach (XmlNode oper in mySearch) + { + var operId = oper.XPath2SelectSingleNode("//Attribute[@Name='indexoper']").Attributes["Value"].Value; + var operName = oper.XPath2SelectSingleNode("//Attribute[@Name='nameoper']").Attributes["Value"].Value; + Console.WriteLine($"{operId} {operName}"); + + foreach (XmlNode step in oper.XPath2SelectNodes("//Object[ends-with(@Name,'_step')]")) + { + var stepNum = step.XPath2SelectSingleNode("//Attribute[@Name='numstep']").Attributes["Value"].Value; + var stepName = step.XPath2SelectSingleNode("//Attribute[@Name='name']").Attributes["Value"].Value; + + Console.WriteLine($" {stepNum}. {stepName}"); + } + } //XmlNodeList childnodes = xRoot.XPath2SelectNodes("//Object[ends-with(@Name,'_oper')], //Object[ends-with(@Name,'_step')]"); //if (childnodes != null)