HTML::Object::XPath::Literal - HTML Object XPath Literal
use HTML::Object::XPath::Literal; my $this = HTML::Object::XPath::Literal->new || die( HTML::Object::XPath::Literal->error, "\n" );
v0.2.1
This module implements the equivalent of a string in XPath parlance.
Provided with a string and this creates a new HTML::Object::XPath::Literal object with the value providedd. Note that " and ' will be converted to " and ' respectively. That is not part of the XPath specification, but I consider it useful. Note though that you have to go to extraordinary lengths in an XML template file (be it XSLT or whatever) to make use of this:
string
<input type="text" value=""I am feeling &quot;perplex&quot;"" />
Which produces a Literal of:
I am feeling "perplex"
Returns a string representation of the literal.
Returns a string representation of the literal as xml.
This is a method used for overload. Provided with another object or string and this will return the same value as "cmp" in perlop, that is it "returns -1, 0, or 1 depending on whether the left argument is stringwise less than, equal to, or greater than the right argument".
It returns the current object.
This raises an exception, as it cannot be used.
Returns a new number object based on the value provided.
Returns the value of the literal as returned by "value"
Returns true if the literal value is true, or false otherwise.
Returns the current object.
Returns a new number object from the value of the literal.
This returns the literal string value. It is also called upon stringification.
Returns the literal value as a number (not a number object), but forcing perl to treat it as a number, i.e. prepending it with a plus sign.
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.