what's next my project?
I have very small knowledge about XPath...
code:
use XPath;
my $xp = XML::XPath->new(ioref => *DATA);
print join "\n", map { $_->toString } $xp->findnodes('//span[@id="first"]/following-sibling::node()/following-sibling::node()');
print "\n";__END__
<html>
<head>
<title>title</title>
</head>
<body>
<div>
<span id="first" class="1"></span>foo<span class="2"></span>bar<span class="3"></span>baz<span id="last" class="4"></span></div>
</body>
</html>
result is:
<span class="2" />
bar
bar
<span class="3" />
<span class="3" />
<span class="3" />
baz
baz
baz
baz
<span id="last" class="4" />
<span id="last" class="4" />
<span id="last" class="4" />
<span id="last" class="4" />
<span id="last" class="4" />
Is this correct behavior?
amachang wrote test set for XPath.
I want to use that test suites for XML::XPath(?:Engine)?.Because, XML::XPath's response is strange in some edge case.