XML::XP...:Literal(3)
πΈ NAME πΈ
Welcome to the XML::XP...:Literal(3) page, bestie β aka XML::XPathEngine::Literal. Simple string values. That's the whole assignment: a tiny Literal object whose main-character trait is holding a string. π
π DESCRIPTION π
Okay so in XPath terms, a Literal is literally what we know as a string. That's the vibe. No extra lore. β¨
β¨ API β¨
π new($string) π
Creates a brand-new Literal object with the value in $string. π«Ά
Important glow-up notice: " and ' get converted to " and ', respectively. That's not part of the XPath specification, but the author considers it useful. π
That said, to actually make use of this in an XML template file (be it XSLT or whatever), you have to go to extraordinary lengths. Like, truly. π Check it:
<xsl:value-of select=""I'm feeling &quot;sad&quot;""/>
And boom, that gives you a Literal of:
I'm feeling "sad"
π¦ value() π¦
Also overloaded as stringification. It simply returns the literal string value. That's it. Iconic, low-effort, effective. π
π cmp($literal) π
Returns the equivalent of perl's cmp operator against the given $literal. So you hand it a $literal, and it does the cmp thing. No cap. π₯
mwah π this page is from perl v5.42.0, dated 2013-06-04, and it's the XML::XP...:Literal(3) manual from User Contributed Perl Documentation. Periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-XML-XPathEngine 0.14-160000.2.2 Β· GPL-1.0+ or Artistic-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms