{
    "mode": "perldoc",
    "parameter": "XML::XPath::Literal",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AXPath%3A%3ALiteral/json",
    "generated": "2026-06-11T23:49:22Z",
    "sections": {
        "NAME": {
            "content": "XML::XPath::Literal - Simple string values.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "In XPath terms a Literal is what we know as a string.\n",
            "subsections": []
        },
        "API": {
            "content": "new($string)\nCreate a new Literal object with the value in $string. Note that &quot; and &apos; will be\nconverted to \" and ' respectively. That is not part of the XPath specification, but I consider\nit useful. Note though that you have to go to extraordinary lengths in an XML template file (be\nit XSLT or whatever) to make use of this:\n\n<xsl:value-of select=\"&quot;I'm feeling &amp;quot;sad&amp;quot;&quot;\"/>\n\nWhich produces a Literal of:\n\nI'm feeling \"sad\"\n\nvalue()\nAlso overloaded as stringification, simply returns the literal string value.\n\ncmp($literal)\nReturns the equivalent of perl's cmp operator against the given $literal.\n",
            "subsections": []
        }
    },
    "summary": "XML::XPath::Literal - Simple string values.",
    "flags": [],
    "examples": [],
    "see_also": []
}