Get attribute value (3) : Attribute « XML « C# / C Sharp
- C# / C Sharp
- XML
- Attribute
Get attribute value (3)
using System;
using System.Xml;
public class XmlUtil
{
#region GetAttrib(XmlNode node, string name)
public static string GetAttrib(XmlNode node, string name)
{
if (node.Attributes == null)
return null;
if (node.Attributes[name] == null)
return null;
return node.Attributes[name].InnerText;
}
#endregion
}
Related examples in the same category