@elements=$obj->getElements($element_name)
Return a list of all elements with the specified name (i.e. type) in the document. If no element name is
provided, returns a list of all elements in the document. In scalar context returns an array reference.
@children=$obj->getChildren()
Return a list of all children defined on the current node, or undef if there are no children. In scalar
context returns an array reference.
Alias: getChildElements(), getChildNodes()@children=$obj->hasChildren()
Return 1 if the current node has children, or 0 if there are no children.
Alias: hasChildElements, hasChildNodes()$ref=$obj->getFirstChild()
Return the first child element of the current node, or undef if there are no children.
$ref=$obj->getLastChild()
Return the last child element of the current node, or undef if there are no children.
$ref=$obj->getSiblings()
Return a list of all children defined on the parent node, containing the current node.
$ref=$obj->getNextSibling()
Return the next child element of the parent node, or undef if this is the last child.
$ref=$obj->getPreviousSibling()
Return the previous child element of the parent node, or undef if this is the first child.
$index=$obj->getChildIndex()
Return the place of this element in the parent node's list of children, starting from 0.
$element=$obj->getChildAtIndex($index)
Returns the child element at the specified index in the parent node's list of children.
$ref=$obj->getParentElement()
Return the parent of the current node.
Alias: getParent()@refs=$obj->getParentElements()
Return a list of the parents of the current node, starting from the immediate parent. The last member of
the list should be the document element.
Alias: getParents()$name=$obj->getElementName()
Return a string containing the name (i.e. the type, not the ID) of an element.
Alias: getType(), getTagName(), getNodeName()$ref=$svg->getElementByID($id)
Alias: getElementbyID()
Return a reference to the element which has ID $id, or undef if no element with this ID exists.
$id=$obj->getElementID()
Return a string containing the ID of the current node, or undef if it has no ID.
$ref=$obj->getAttributes()
Return a hash reference of attribute names and values for the current node.
$value=$obj->getAttribute($name);
Return the string value attribute value for an attribute of name $name.
$ref=$obj->setAttributes({name1=>$value1,name2=>undef,name3=>$value3})
Set a set of attributes. If $value is undef, deletes the attribute.
$value=$obj->setAttribute($name,$value);
Set attribute $name to $value. If $value is undef, deletes the attribute.
$cdata=$obj->getCDATA()
Return the canonical data (i.e. textual content) of the current node.
Alias: getCdata(), getData()$boolean=$obj->isAncestor($element)
Returns 1 if the current node is an ancestor of the specified element, otherwise 0.
$boolean=$obj->isDescendant($element)
Returns 1 if the current node is a descendant of the specified element, otherwise 0.
$boolean=$obj->insertBefore($element,$child);
Returns 1 if $element was successfully inserted before $child in $obj
$boolean=$obj->insertAfter($element,$child);
Returns 1 if $element was successfully inserted after $child in $obj
$boolean=$obj->insertSiblingBefore($element);
Returns 1 if $element was successfully inserted before $obj
$boolean=$obj->insertSiblingAfter($element);
Returns 1 if $element was successfully inserted after $obj
$element=$obj->replaceChild($element,$child);
Returns $child if $element successfully replaced $child in $obj
$element=$obj->removeChild($child);
Returns $child if it was removed successfully from $obj
$element=$obj->cloneNode($deep);
Returns a new $element clone of $obj, without parents or children. If deep is set to 1, all children are
included recursively.