Andy Wardley > Template-Toolkit-2.00 > Template::Plugin::XML::XPath

Download:
Template-Toolkit-2.00.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  50
Open  17
View/Report Bugs
Module Version: 2.01   Source   Latest Release: Template-Toolkit-2.14

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.

syntax highlighting: