Grant McLean > File-Find-Rule-XPath-0.03 > File::Find::Rule::XPath

Download:
File-Find-Rule-XPath-0.03.tar.gz

Dependencies

Annotate this POD

Related Modules

File::Find
File::Find::Rule
more...
By perlmonks.org
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

File::Find::Rule::XPath - rule to match on XPath expressions

SYNOPSIS ^

  use File::Find::Rule::XPath;
  
  my @files = File::Find::Rule->file
              ->name('*.dkb')
              ->xpath( '//section/title[contains(., "Crustacean")]' )
              ->in($root);

DESCRIPTION ^

This module extends File::Find::Rule to provide the ability to locate XML files which match a given XPath expression.

METHODS ^

xpath( $xpath_expression )

Matches XML files which contain one or more nodes matching the given XPath expression. Files which are not 'well formed' XML are silently skipped.

If no XPath expression is supplied, the value '/' is used. This will match all files which are well formed XML.

AUTHOR ^

Grant McLean <grantm@cpan.org>

SEE ALSO ^

To use this module, you must have File::Find::Rule and one of the following XPath implementations: XML::LibXML or XML::XPath

COPYRIGHT ^

Copyright 2002 Grant McLean <grantm@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: