GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XPath(3) User Contributed Perl Documentation XPath(3)

XML::DOM::XPath - Perl extension to add XPath support to XML::DOM, using XML::XPath engine

  use XML::DOM::XPath;

  my $parser= XML::DOM::Parser->new();
  my $doc = $parser->parsefile ("file.xml");

  # print all HREF attributes of all CODEBASE elements
  # compare with the XML::DOM version to see how much easier it is to use
  my @nodes = $doc->findnodes( '//CODEBASE[@HREF]/@HREF');
  print $_->getValue, "\n" foreach (@nodes);

XML::DOM::XPath allows you to use XML::XPath methods to query a DOM. This is often much easier than relying only on getElementsByTagName.

It lets you use all of the XML::DOM methods.

Those methods can be applied to a whole dom object or to a node.

return a list of nodes found by $path.

return the nodes found reproduced as XML. The result is not guaranteed to be valid XML though.

return the concatenation of the text content of the result nodes

return true if the given path exists.

return true if the node matches the path.

  XML::DOM

  XML::XPathEngine

Michel Rodriguez, mirod@cpan.org

Copyright 2003 by Michel Rodriguez

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

2008-04-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.