Element.getAttribute( name as String ) as String
Get the value of the attribute of this element with the given name, if any.
Parameters | |
---|---|
name | The name of the attribute. |
Since lookup is by the string value of the name, it is best to avoid using this method for namespaced attributes. Use getAttributeNS instead.
cts.doc("example.xml").getElementById("ex1").getAttribute("class")