NAME
Template::Plugin::XML::XPath - Template Toolkit plugin to the XML::XPath module
SYNOPSIS
# load plugin and specify XML file to parse
[% USE xpath = XML.XPath(xmlfile) %]
[% USE xpath = XML.XPath(file => xmlfile) %]
[% USE xpath = XML.XPath(filename => xmlfile) %]
# load plugin and specify XML text to parse
[% USE xpath = XML.XPath(xmltext) %]
[% USE xpath = XML.XPath(xml => xmltext) %]
[% USE xpath = XML.XPath(text => xmltext) %]
# then call any XPath methods (see XML::XPath docs)
[% FOREACH page = xpath.findnodes('/html/body/page') %]
[% page.getAttribute('title') %]
[% END %]
PRE-REQUISITES
This plugin requires that the XML::Parser and XML::XPath modules be installed. These are available from CPAN:
http://www.cpan.org/modules/by-module/XML
DESCRIPTION
This is a Template Toolkit plugin interfacing to the XML::XPath module. =head1 AUTHOR
This plugin module was written by Andy Wardley <abw@kfs.org>.
The XML::XPath module is by Matt Sergeant <matt@sergeant.org<gt>.
REVISION
$Revision: 2.1 $
COPYRIGHT
Copyright (C) 2000 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
For further information see XML::XPath, XML::Parser and Template::Plugin.