Element Objects
...............
`Element' is a subclass of `Node', so inherits all the attributes of
that class.
`tagName'
The element type name. In a namespace-using document it may have
colons in it. The value is a string.
`getElementsByTagName(tagName)'
Same as equivalent method in the `Document' class.
`getElementsByTagNameNS(tagName)'
Same as equivalent method in the `Document' class.
`getAttribute(attname)'
Return an attribute value as a string.
`getAttributeNode(attrname)'
Return the `Attr' node for the attribute named by ATTRNAME.
`getAttributeNS(namespaceURI, localName)'
Return an attribute value as a string, given a NAMESPACEURI and
LOCALNAME.
`getAttributeNodeNS(namespaceURI, localName)'
Return an attribute value as a node, given a NAMESPACEURI and
LOCALNAME.
`removeAttribute(attname)'
Remove an attribute by name. No exception is raised if there is no
matching attribute.
`removeAttributeNode(oldAttr)'
Remove and return OLDATTR from the attribute list, if present. If
OLDATTR is not present, `NotFoundErr' is raised.
`removeAttributeNS(namespaceURI, localName)'
Remove an attribute by name. Note that it uses a localName, not a
qname. No exception is raised if there is no matching attribute.
`setAttribute(attname, value)'
Set an attribute value from a string.
`setAttributeNode(newAttr)'
Add a new attibute node to the element, replacing an existing
attribute if necessary if the `name' attribute matches. If a
replacement occurs, the old attribute node will be returned. If
NEWATTR is already in use, `InuseAttributeErr' will be raised.
`setAttributeNodeNS(newAttr)'
Add a new attibute node to the element, replacing an existing
attribute if necessary if the `namespaceURI' and `localName'
attributes match. If a replacement occurs, the old attribute node
will be returned. If NEWATTR is already in use,
`InuseAttributeErr' will be raised.
`setAttributeNS(namespaceURI, qname, value)'
Set an attribute value from a string, given a NAMESPACEURI and a
QNAME. Note that a qname is the whole attribute name. This is
different than above.