Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / XmlUtility Class / GetAttributeValue Method / GetAttributeValue(XmlNode,String,String) Method
XML document to get the attribute value from
The name of the attribute to get value for
The default value to return if the attribute is not found
In This Topic
    GetAttributeValue(XmlNode,String,String) Method
    In This Topic
    Gets value of the specified attribute from the given XML document
    Syntax
    public static string GetAttributeValue( 
       XmlNode xmlDoc,
       string attribute,
       string defaultValue
    )

    Parameters

    xmlDoc
    XML document to get the attribute value from
    attribute
    The name of the attribute to get value for
    defaultValue
    The default value to return if the attribute is not found

    Return Value

    Value of the specified attribute
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also