Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

XML::LibXML::Literal

Name XML::LibXML::Literal
Version 2.0132
Located at /usr/lib64/perl5/vendor_perl
File /usr/lib64/perl5/vendor_perl/XML/LibXML/Literal.pm
Is Core No
Search CPAN for this module XML::LibXML::Literal
Documentation XML::LibXML::Literal
Module Details XML::LibXML::Literal

NAME

XML::LibXML::Literal - Simple string values.


DESCRIPTION

In XPath terms a Literal is what we know as a string.


API

new($string)

Create a new Literal object with the value in $string. 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:

        <xsl:value-of select="&quot;I'm feeling &amp;quot;sad&amp;quot;&quot;"/>

Which produces a Literal of:

        I'm feeling "sad"

value()

Also overloaded as stringification, simply returns the literal string value.

cmp($literal)

Returns the equivalent of perl's cmp operator against the given $literal.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024