Test::XML::XPath 0.07
Sponsored Links
Test::XML::XPath 0.07 Ranking & Summary
File size:
0.009 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1055
Date added:
2006-12-04
Publisher:
Dominic Mitchell
Test::XML::XPath 0.07 description
Test::XML::XPath is a Perl module to test XPath assertions.
SYNOPSIS
use Test::XML::XPath tests => 3;
like_xpath(
, /foo ); # PASS
like_xpath(
, /bar ); # FAIL
unlike_xpath(
, /bar ); # PASS
is_xpath(
bar
/foo>
, /foo, bar ); # PASS
is_xpath(
bar
/foo>
, /bar, foo ); # FAIL
# More interesting examples of xpath assertions.
my $xml =
pub
/bosh>
/bish>
/foo>
;
# Do testing for attributes.
like_xpath( $xml, /foo[@attrib="1"] ); # PASS
# Find an element anywhere in the document.
like_xpath( $xml, //bosh ); # PASS
# Both.
like_xpath( $xml, //bosh[@args="42"] ); # PASS
This module allows you to assert statements about your XML in the form of XPath statements. You can say that a piece of XML must contain certain tags, with so-and-so attributes, etc. It will try to use any installed XPath module that it knows about. Currently, this means XML::LibXML and XML::XPath, in that order.
NB: Normally in XPath processing, the statement occurs from a context node. In the case of like_xpath(), the context node will always be the root node. In practice, this means that these two statements are identical:
# Absolute path.
like_xpath(
, /foo );
# Path relative to root.
like_xpath(
, foo );
Its probably best to use absolute paths everywhere in order to keep things simple.
NB: Beware of specifying attributes. Because they use an @-sign, perl will complain about trying to interpolate arrays if you dont escape them or use single quotes.
SYNOPSIS
use Test::XML::XPath tests => 3;
like_xpath(
like_xpath(
unlike_xpath(
is_xpath(
is_xpath(
# More interesting examples of xpath assertions.
my $xml =
# Do testing for attributes.
like_xpath( $xml, /foo[@attrib="1"] ); # PASS
# Find an element anywhere in the document.
like_xpath( $xml, //bosh ); # PASS
# Both.
like_xpath( $xml, //bosh[@args="42"] ); # PASS
This module allows you to assert statements about your XML in the form of XPath statements. You can say that a piece of XML must contain certain tags, with so-and-so attributes, etc. It will try to use any installed XPath module that it knows about. Currently, this means XML::LibXML and XML::XPath, in that order.
NB: Normally in XPath processing, the statement occurs from a context node. In the case of like_xpath(), the context node will always be the root node. In practice, this means that these two statements are identical:
# Absolute path.
like_xpath(
# Path relative to root.
like_xpath(
Its probably best to use absolute paths everywhere in order to keep things simple.
NB: Beware of specifying attributes. Because they use an @-sign, perl will complain about trying to interpolate arrays if you dont escape them or use single quotes.
Test::XML::XPath 0.07 Screenshot
Test::XML::XPath 0.07 Keywords
XPath
XML
PASS
XPath 0.07
to test
Perl module
module
Perl
assertions
test
0.07
Test::XML::XPath
TestXMLXPath
Test::XML::XPath 0.07
Libraries
Programming
Bookmark Test::XML::XPath 0.07
Test::XML::XPath 0.07 Copyright
WareSeeker periodically updates pricing and software information of Test::XML::XPath 0.07 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Test::XML::XPath 0.07 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
Pod::Template is a Perl module for building pod documentation from templates. Free Download
Test::Perl::Critic is a Perl module use Perl::Critic in test programs. Free Download
CVS Perl library is a Perl module which is is a wrapper around the CVS command with an object-oriented interface. Free Download
XML::DOM::Lite::XPath is a Perl module for XPath support for XML::DOM::Lite. Free Download
Tk::SlideShow is a Tk Perl module for building slide-like presentations. Free Download
Pathan-P provides Perl bindings for Pathan 1. Free Download
XML::CompareML is a Perl module for managing multi-system and multi-item comparisons. Free Download
XML::Output is a Perl module for writing simple XML documents. Free Download
Latest Software
Popular Software
Favourite Software