NAME
XML::Elemental::Element - a generic element object for use with the Elemental parser style.
DESCRIPTION
XML::Elemental::Element is a subclass of XML::Elemental::Node that is used by the Elemental parser style to represent a tag.
METHODS
- XML::Elemental::Element->new
-
Parameterless constructor. Returns an instance of the object.
- $element->name([$name])
-
Returns the tag name as a string. If the XML::Parser Namespace option is set to true, the extend name (combined URI and tag) is stored. If a parameter is passed the name is set.
- $element->parent([$object])
-
Returns a reference to the parent object. If a parameter is passed the parent is set.
- $element->contents([\@children])
-
Returns an ordered array reference of direct sibling objects. Returns a reference to an empty array if the element does not have any siblings. If a parameter is passed all the direct siblings are (re)set.
- $element->attributes([\%attributes])
-
Returns a hash reference of key-value pairs representing the tag's attributes. If the XML::Parser Namespace option is set to true, the extend name (combined URI and tag) of the attribute is stored. It returns a reference to an empty hash if the element does not have any attributes. If a parameter is passed all attributes are (re)set.
- $element->text_content
-
A method that returns the character data of all siblings.
- $element->root
-
A method that returns a reference to the Elemental Document object.
AUTHOR & COPYRIGHT
Please see the XML::Elemental manpage for author, copyright, and license information.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 40:
=begin without a target?
- Around line 54:
'=item' outside of any '=over'
- Around line 93:
You forgot a '=back' before '=head1'
- Around line 100:
'=end' without a target?