Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / XmlUtility Class / GetAttributeValue Method / GetAttributeValue(XmlElement,String,String) Method
XML element 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(XmlElement,String,String) Method
    In This Topic
    Gets value of the specified attribute from the given XML element
    Syntax
    public static string GetAttributeValue( 
       XmlElement xmlElem,
       string attribute,
       string defaultValue
    )

    Parameters

    xmlElem
    XML element 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