NAME

XML::Atom::Syndication::Element - a class representing a tag element in an Atom syndication feed with an XPath-esque interface.

DESCRIPTION

This module is a simple class for representing a tag element in an Atom syndication feed parse tree that implements an XPath-esque interface for query the tree of elements and retreiving data.

METHODS

XML::Atom::Syndication::Element->new

Constructor method. Creates an instance and returns it.

$atom->name([$name])

Returns the extended name (Namespace URI and tag name) of the element. Sets the value when an optional parameter is passed.

$atom->qname([$extend_name])

Returns the qualified name (QName) according to the XPath namespace prefixes. Takes an optional extended name parameter to resolve, Returns the QName of the current element otherwise.

$atom->parent([$element])

Returns a reference to the element's parent object in the parse tree. Sets the value when an optional parameter is passed.

$atom->contents([\@children])

Returns an array reference to the element's child objects in the parse tree. Sets the value when an optional array reference parameter is passed.

$atom->attributes([\%attr])

Returns a hash reference of the element's attributes. Sets the value when an optional hash reference parameter is passed.

$atom->text_value

This method returns all of the sibling character data (read: the text and whitespace between this element's start and end tag with the tags stripped) as a single string.

$atom->query($xpath)

Takes XPath-esque query string and, similar to the param method in the CGI pacakge, returns either the first item found or an array of all matching elements depending on the context in which it is called. undef is returned if nothing could be matched. These objects will be of this class except for the root element which will be a XML::Atom::Syndication::Document object.

This is not a full XPath implementation. For more details on the supported syntax see the documentation for Class::XPath.

$atom->xpath

Returns a unique XPath identifier string for the element.

SEE ALSO

XML::Parser::Style::Elemental, XML::Atom, Class::XPath

AUTHOR & COPYRIGHT

Please see the XML::Atom::Syndication manpage for author, copyright, and license information.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 101:

=begin without a target?

Around line 116:

'=item' outside of any '=over'

Around line 169:

You forgot a '=back' before '=head1'

Around line 180:

'=end' without a target?