HTML::Object::XPath::Expr - HTML Object XPath Expression
=head1 SYNOPSIS
use HTML::Object::XPath::Expr;
my $this = HTML::Object::XPath::Expr->new || die( HTML::Object::XPath::Expr->error, "\n" );
=head1 VERSION
v0.2.0
=head1 DESCRIPTION
This modules represents an L<HTML::Object::XPath> expression.
=head1 METHODS
=head2 new
Provided with an L<HTML::Object::XPath> object and this returns a new L<HTML::Object::XPath::Expr> object.
=head2 as_string
Returns the expression as a string.
=head2 as_xml
Returns the expression as xml.
=head2 evaluate
Provided with a L<HTML::Object::XPath::NodeSet> object, and this will call L</op_eval> with an L<operator|/op> has been set, otherwise, it calls L<HTML::Object::XPath::LocationPath/evaluate> passing it the node set. It returns the result from either call.
=head2 filter_by_predicate
This takes a nodeset object and a predicate.
For each node in the node-set to be filtered, the predicate Expr is evaluated with that node as the context node, with the number of nodes in the node set as the context size, and with the proximity position of the node in the node set with respect to the axis as the context position.
It returns a new L<node set|HTML::Object::XPath::NodeSet> object.
=head2 get_lhs
Returns the L<HTML::Object::XPath::LocationPath> object for the left-hand side of the expression.
=head2 get_rhs
Returns the L<HTML::Object::XPath::LocationPath> object for the right-hand side of the expression.
=head2 get_op
Returns the current operator set for this expression.
=head2 new_literal
Returns a new L<literal object|HTML::Object::XPath::Literal>, passing it whatever argument was provided.
=head2 new_nodeset
Returns a new L<node set object|HTML::Object::XPath::NodeSet>, passing it whatever argument was provided.
=head2 new_number
Returns a new L<number object|HTML::Object::XPath::Number>, passing it whatever argument was provided.
=head2 op_and
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will evaluate the node using the left-hand side LocationPath object, and return L<false|HTML::Object::XPath::Boolean> if it failed, or otherwise it wil evaluate the node using the right-hand side LocationPath object and return its result.
=head2 op_div
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will attempt to divide the left-hand value by the right-hand value. If ther eis an error, it returns L<infinity|HTML::Object::XPath::Number>, otherwise it returns the value from the division as a L<number object|HTML::Object::XPath::Number>.
=head2 op_equals
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side LocationPath is equal tot he right-hand side LocationPath. Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_eval
This method will evaluate the L<node|HTML::Object::ELement> provided with the left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> object also specified by calling the appropriate method in this module based on the operator value set with L</op>
=head2 op_ge
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side is greater or equal to the right-hand side.
Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_gt
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side is greater than the right-hand side.
Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_le
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side is lower or equal than the right-hand side.
Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_lt
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side is lower than the right-hand side.
Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_match
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side match the right-hand side as a regular expression.
Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_minus
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will subtract the right-hand side from the left-hand side and return the result as a L<number object|HTML::Object::XPath::Number>.
=head2 op_mod
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will get the modulo between the left-hand side and the right-hand side and return the result as a L<number object|HTML::Object::XPath::Number>.
=head2 op_mult
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will multiply the right-hand side by the left-hand side and return the result as a L<number object|HTML::Object::XPath::Number>.
=head2 op_nequals
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will return L<true|HTML::Object::XPath::Boolean> if the left-hand side is not equal to the right-hand side, or L<false|HTML::Object::XPath::Boolean> otherwise.
=head2 op_not_match
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will check if the left-hand side does B<not> match the right-hand side as a regular expression.
Returns L<true|HTML::Object::XPath::Boolean> or L<false|HTML::Object::XPath::Boolean>
=head2 op_or
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will evaluate the node using the left-hand side LocationPath and return L<true|HTML::Object::XPath::Boolean> if it worked, or otherwise return the value from evaluating the node using the right-hand side LocationPath.
=head2 op_plus
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will add the right-hand side to the left-hand side and return the result as a L<number object|HTML::Object::XPath::Number>.
=head2 op_union
Provided a L<node object|HTML::Object:Element>, a left-hand side and right-hand side L<LocationPath objects|HTML::Object::XPath::LocationPath> and this will evaluate the node both by the left-hand side and right-hand side LocationPath and return a new L<node set array object|HTML::Object::XPath::NodeSet> containing all the unique nodes resulting from those both evaluation.
=head2 op_xml
Provided with an operator and this returns its xml equivalent.
They will be converted respectively to: C<And>, C<Div>, C<Mod>, C<Or>, C<Equals>, C<NotEquals>, C<LessThanOrEquals>, C<GreaterThanOrEquals>, C<GreaterThan>, C<LessThan>, C<Plus>, C<Minus>, C<Multiply>, C<Union>
=head2 predicates
Set or get the predicates as an L<array object|Module::Generic::Array>
=head2 push_predicate
Add the predicate to the list and will raise an exception if more than one predicate was provided.
=head2 set_lhs
Set the left-hand side L<LocationPath|HTML::Object::XPath::LocationPath>
=head2 set_op
Set the operator for this expression.
=head2 set_rhs
Set the right-hand side L<LocationPath|HTML::Object::XPath::LocationPath>