Element.getAttribute

string getAttribute(string name) @scriptable const

Gets the given attribute value, or null if the attribute is not set.

Note that the returned string is decoded, so it no longer contains any xml entities.