XML Attribute Exists - CSharp System.Xml

CSharp examples for System.Xml:XML Attribute

Description

XML Attribute Exists

Demo Code


using System.Xml.XPath;
using System.Xml;
using System.Text;
using System.IO;//from www  .  ja va  2  s .  c  om
using System;

public class Main{
        #endregion

        #region GetAttributeValue

        public static bool AttributeExists(XmlNode node, string attributeName)
        {
            return (node.Attributes[attributeName] != null);
        }
}

Related Tutorials