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.
XML::Parser::Style::Elemental dynamically constructs the extremely rudimentary XML::Atom::Syndication::Document and XML::Atom::Syndication::Characters packages. The Element object is marginally more sophisticated and required something a bit more specific to implement and manage the XPath interface and underlying functions.
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->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)
-
Take XPath-esque query string and returns an array of matching elements or
undef
if nothing could be matched. These objects will be XML::Atom::Syndication elements except for the root element which will be a (dynamically generated) 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
LICENSE
The software is released under the Artistic License. The terms of the Artistic License are described at http://www.perl.com/language/misc/Artistic.html.
AUTHOR & COPYRIGHT
Except where otherwise noted, XML::Atom::Syndication::Element is Copyright 2004, Timothy Appnel, cpan@timaoutloud.org. All rights reserved.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 90:
=begin without a target?
- Around line 112:
'=item' outside of any '=over'
- Around line 158:
You forgot a '=back' before '=head1'
- Around line 176:
'=end' without a target?