1XML::LibXML::Literal(3)User Contributed Perl DocumentatioXnML::LibXML::Literal(3)
2
3
4
6 XML::LibXML::Literal - Simple string values.
7
9 In XPath terms a Literal is what we know as a string.
10
12 new($string)
13 Create a new Literal object with the value in $string. Note that "
14 and ' will be converted to " and ' respectively. That is not part
15 of the XPath specification, but I consider it useful. Note though that
16 you have to go to extraordinary lengths in an XML template file (be it
17 XSLT or whatever) to make use of this:
18
19 <xsl:value-of select=""I'm feeling &quot;sad&quot;""/>
20
21 Which produces a Literal of:
22
23 I'm feeling "sad"
24
25 value()
26 Also overloaded as stringification, simply returns the literal string
27 value.
28
29 cmp($literal)
30 Returns the equivalent of perl's cmp operator against the given
31 $literal.
32
33
34
35perl v5.38.0 2023-07-21 XML::LibXML::Literal(3)