You can write a helper:
XmlNode selectSingleNode(XmlNode src, string path)
{
XmlNode[] nodes = src.parseXPath(path);
return nodes.length==0 ? null : nodes[0];
}Then: string test1 = node.selectSingleNode(`//instanceId`).getCData();
Kagamin via Digitalmars-d-learn Tue, 20 Oct 2015 00:55:53 -0700
You can write a helper:
XmlNode selectSingleNode(XmlNode src, string path)
{
XmlNode[] nodes = src.parseXPath(path);
return nodes.length==0 ? null : nodes[0];
}Then: string test1 = node.selectSingleNode(`//instanceId`).getCData();