AlphaTab.Platform.Std.GetNodeValue C# (CSharp) Method

GetNodeValue() public static method

public static GetNodeValue ( IXmlNode n ) : string
n IXmlNode
return string
        public static string GetNodeValue(IXmlNode n)
        {
            if (n.NodeType == XmlNodeType.Element || n.NodeType == XmlNodeType.Document)
            {
                var txt = new StringBuilder();
                n.IterateChildren(c =>
                {
                    txt.Append(GetNodeValue(c));
                });
                return txt.ToString().Trim();
            }
            return n.Value;
        }