Select Single XML Text String - CSharp System.Xml

CSharp examples for System.Xml:XML String

Description

Select Single XML Text String

Demo Code


using System.Xml;
using System;/* w  w  w .  j a v a2  s.  c  o  m*/

public class Main{
        public static string SelectSingleTextString(XmlNode node, string selector, string defaultValue = null)
    {
        workNode = node.SelectSingleNode(selector, Manager);
        return workNode?.InnerText ?? defaultValue;
    }
}

Related Tutorials