Browse Source

Базовые методы получения параметров операции и перехода

tolist
parent
commit
f273d81ebe
  1. 15
      XmlTest/Program.cs

15
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)

Loading…
Cancel
Save