Link Search Menu Expand Document

XmlElement.GetAttribute Method

Explanation Get the value of the Attr node with the specified attribute name .
Call format var s = elm.GetAttribute( name )
Return value Value of Attr node string
If the Attr node is not found, it returns an empty string.
Arguments String name get the value of attribute name of the Attr node
Exception None
Example of use
    var domimpl = new XmlDOMImplementation;
    var res = session.Get("/test/sample.xml");
    var xmldoc = domimpl.Load(res);
    var elm = xmldoc.DocumentElement;
    var s = elm.GetAttribute("width");
    print(s, "\n");
    
Related item XmlAttr class
SetAttribute, RemoveAttribute, HasAttribute, GetAttributeNode, GetAttributeNS, GetAttributeNodeNS method