|
|
XML::GDOME::Element - Interface Element implementation.
$str = $el->getTagName(); $str = $el->getAttribute($name); $str = $el->getAttributeNS($namespaceURI,$localName); $attr = $el->getAttributeNode($name); $attr = $el->getAttributeNodeNS($namespaceURI,$localName); $nodeList = $el->getElementsByTagName($name); $nodeList = $el->getElementsByTagNameNS($namespaceURI,$localName); $bool = $el->hasAttribute($name); $bool = $el->hasAttributeNS($namespaceURI,$localName); $el->removeAttribute($name); $el->removeAttributeNS($namespaceURI,$localName); $attr = $el->removeAttributeNode($oldAttr); $el->setAttribute($name,$value); $el->setAttributeNS($namespaceURI,$qualifiedName,$value); $attr = $el->setAttributeNode($newAttr); $attr = $el->setAttributeNodeNS($newAttr); $elem->appendText($PCDATA);
the XML::GDOME::Node manpage > XML::GDOME::Element
name
: The name of attribute of which the value is wanted
Returns: the Attr value as a string, or the empty string if that attribute does not have a specified or default value.
namespaceURI
: The namespaceURI of attribute to retrieve
localName
: The localName of the attribute to retrieve
Returns: the Attr value as a string, or the empty string if that attribute does not have a specified or default value.
gdome_el_getAttributeNodeNS()
method.
name
: The name of the attribute to retreive
Returns: the Attr node with the specified name or undef if there is no such attribute.
namespaceURI
: The namespace URI of the attribute to retrieve.
localName
: The local name of the attribute to retrieve.
Returns: the Attr node with the specified attribute local name and namespace URI or undef if there is no such attribute.
name
: The name of the tag to match on. The special value * matches all tags.
Returns: a NodeList of all descendant elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree. In array context, returns array.
namespaceURI
: The namespace URI of the elements to match on. The special value * matches all namespaces.
localName
: The local name of the elements to match on. The special value * matches all local names.
Returns: a NodeList of all the descendant elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree. In array context, returns array.
name
: The name of the attribute to look for.
Returns: 1 when an attribute with a given name is specified on this element or has a default value, 0 otherwise.
namespaceURI
: The namespaceURI of the attribute to look for.
localName
: The localName of the attribute to look for.
Returns: 1 when an attribute with a given local name and namespace URI is specified on this element or has a default value, 0 otherwise.
gdome_el_removeAttributeNS()
function.
name
: The name of the attribute to remove
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
namespaceURI
: The namespaceURI of attribute to remove
localName
: The localName of the attribute to remove
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
oldAttr
: The Attr node to remove from the attribute list
Returns: the Attr node that was removed.
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
GDOME_NOT_FOUND_ERR
: Raised if oldAttr is not an attribute of the element.
name
: The name of the attribute to create or altervalue: Value to set in string form
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
namespaceURI
: The namespace URI of attribute to create or alter
qualifiedName
: The qualifiedName of the attribute to create or altervalue: Value to set in string form
GDOME_NAMESPACE_ERR
: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is undef, if the qualifiedName has a prefix that is ``xml'' and the namespaceURI is different from ``http://www.w3.org/XML/1998/namespace'', or if the qualifiedName is ``xmlns'' and the namespaceURI is different from ``http://www.w3.org/2000/xmlns/''.
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
gdome_el_setAttributeNodeNS()
method.
newAttr
: The Attr node to add to the attribute list
Returns: if the newAttr attribute replaces an existing attribute, the replaced Attr node is returned, otherwise undef is returned.
GDOME_INUSE_ATTRIBUTE_ERR
: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
GDOME_WRONG_DOCUMENT_ERR
: Raised if newAttr was created from a different document than the one that created the element.
newAttr
: The Attr node to add to the attribute list
Returns: if the newAttr attribute replaces an existing attribute with the same local name and namespace URI, the replaced Attr node is returned, otherwise undef is returned.
GDOME_INUSE_ATTRIBUTE_ERR
: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
GDOME_NO_MODIFICATION_ALLOWED_ERR
: Raised if this node is readonly.
GDOME_WRONG_DOCUMENT_ERR
: Raised if newAttr was created from a different document than the one that created the element.