HTML::Object::XPath::Step - HTML Object XPath Step
use HTML::Object::XPath::Step; my $this = HTML::Object::XPath::Step->new || die( HTML::Object::XPath::Step->error, "\n" );
v0.2.0
This module represents a XPath step.
It takes a HTML::Object::XPath object, an axis, a test name and a literal and returns a new HTML::Object::XPath::Step object.
axis
test
literal
Returns a string representation of the step.
Returns a string representation of the step as xml.
Set or get the axis.
Provided with a context and a HTML::Object::XPath::NodeSet object, and this will add each parent until there are none found anymore, to the resulting node set and returns it.
This performs a similar function as "axis_ancestor", except it test each node and add it to the result, before going up to the next parent.
Provided with a context and a node set and this will add each of its attribute object to the resulting node set and returns it.
Provided with a context and a HTML::Object::XPath::NodeSet object, and this will add each of the children's node and returns the resulting set.
Provided with a context and a HTML::Object::XPath::NodeSet object, and this will add each of the children's node and its children after that until there is none and returns the resulting set.
This performs a similar function as "axis_ancestor", except it test each node and add it to the result, before going down to the next children's nodes.
Provided with a context and a node set and this will get all the first child in the tree of the element's next sibling.
Provided with a context and a node set and this will add its next sibling to the resulting node set and its sibling sibling and so forth. It returns the resulting node set.
Set or get the axis method.
Provided with a context and a node set and this will add each namespace of the context into the result.
context
Provided with a context and a node set and this will psh to the result array the context's parent, if any. It returns the resulting node set.
Provided with a context and a node set and this will get all the last child of the previous sibling hierarchy. It returns the resulting node set.
Provided with a context and a node set and this will all the previous siblings recursively. It returns the resulting node set.
Provided with a context and a node set and this will return the node set with the provided context added to it.
Provided with a node set or a node and this will evaluate each element of the nod set by calling "evaluate_node" for each of them and adding the result to a new node set and returns it.
Provided with a context and this will evaluate the context, by calling the method set in "axis_method" and passing it the context and a new node set. It returns the new node set.
Provided with a node set and a predicate and this will evaluate each element in the node set with the predicate. Based on the result, it will add the node evaluated to a new node set that is returned.
Set or get the literal value.
Returns a new node set object passing it whatever arguments was provided.
Provided with a node and this will test it based on the test set for this step and return a certain value; most of the time a simple true value.
Set or get the test name (or actually number) to be performed.
Provided with a node and this will test its attribute.
Provided with a node and this will test its name space.
Jacques Deguest <jack@deguest.jp>
HTML::Object::XPath, HTML::Object::XPath::Boolean, HTML::Object::XPath::Expr, HTML::Object::XPath::Function, HTML::Object::XPath::Literal, HTML::Object::XPath::LocationPath, HTML::Object::XPath::NodeSet, HTML::Object::XPath::Number, HTML::Object::XPath::Root, HTML::Object::XPath::Step, HTML::Object::XPath::Variable
Copyright(c) 2021 DEGUEST Pte. Ltd.
All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTML::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Object
CPAN shell
perl -MCPAN -e shell install HTML::Object
For more information on module installation, please visit the detailed CPAN module installation guide.