{
    "content": [
        {
            "type": "text",
            "text": "# XML::RPC::Enc::LibXML (perldoc)\n\n## NAME\n\nXML::RPC::Enc::LibXML - Encode/decode XML-RPC using LibXML\n\n## SYNOPSIS\n\nuse XML::RPC::Fast;\nuse XML::RPC::Enc::LibXML;\nmy $rpc = XML::RPC::Fast->new(\n$uri,\nencoder => XML::RPC::Enc::LibXML->new(\n# internalencoding currently not implemented, always want wide chars\ninternalencoding => undef,\nexternalencoding => 'windows-1251',\n)\n);\n$rpc->registerType( base64 => sub {\nmy $node = shift;\nreturn MIME::Base64::decode($node->textContent);\n});\n$rpc->registerType( 'dateTime.iso8601' => sub {\nmy $node = shift;\nreturn DateTime::Format::ISO8601->parsedatetime($node->textContent);\n});\n$rpc->registerClass( DateTime => sub {\nreturn ( 'dateTime.iso8601' => $[0]->strftime('%Y%m%dT%H%M%S.%3N%z') );\n});\n$rpc->registerClass( DateTime => sub {\nmy $node = XML::LibXML::Element->new('dateTime.iso8601');\n$node->appendText($[0]->strftime('%Y%m%dT%H%M%S.%3N%z'));\nreturn $node;\n});\n\n## DESCRIPTION\n\nDefault encoder/decoder for XML::RPC::Fast\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **IMPLEMENTED METHODS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::RPC::Enc::LibXML",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::RPC::Enc::LibXML - Encode/decode XML-RPC using LibXML",
        "synopsis": "use XML::RPC::Fast;\nuse XML::RPC::Enc::LibXML;\nmy $rpc = XML::RPC::Fast->new(\n$uri,\nencoder => XML::RPC::Enc::LibXML->new(\n# internalencoding currently not implemented, always want wide chars\ninternalencoding => undef,\nexternalencoding => 'windows-1251',\n)\n);\n$rpc->registerType( base64 => sub {\nmy $node = shift;\nreturn MIME::Base64::decode($node->textContent);\n});\n$rpc->registerType( 'dateTime.iso8601' => sub {\nmy $node = shift;\nreturn DateTime::Format::ISO8601->parsedatetime($node->textContent);\n});\n$rpc->registerClass( DateTime => sub {\nreturn ( 'dateTime.iso8601' => $[0]->strftime('%Y%m%dT%H%M%S.%3N%z') );\n});\n$rpc->registerClass( DateTime => sub {\nmy $node = XML::LibXML::Element->new('dateTime.iso8601');\n$node->appendText($[0]->strftime('%Y%m%dT%H%M%S.%3N%z'));\nreturn $node;\n});",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "IMPLEMENTED METHODS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 35,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::RPC::Enc::LibXML - Encode/decode XML-RPC using LibXML\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use XML::RPC::Fast;\nuse XML::RPC::Enc::LibXML;\n\nmy $rpc = XML::RPC::Fast->new(\n$uri,\nencoder => XML::RPC::Enc::LibXML->new(\n# internalencoding currently not implemented, always want wide chars\ninternalencoding => undef,\nexternalencoding => 'windows-1251',\n)\n);\n\n$rpc->registerType( base64 => sub {\nmy $node = shift;\nreturn MIME::Base64::decode($node->textContent);\n});\n\n$rpc->registerType( 'dateTime.iso8601' => sub {\nmy $node = shift;\nreturn DateTime::Format::ISO8601->parsedatetime($node->textContent);\n});\n\n$rpc->registerClass( DateTime => sub {\nreturn ( 'dateTime.iso8601' => $[0]->strftime('%Y%m%dT%H%M%S.%3N%z') );\n});\n\n$rpc->registerClass( DateTime => sub {\nmy $node = XML::LibXML::Element->new('dateTime.iso8601');\n$node->appendText($[0]->strftime('%Y%m%dT%H%M%S.%3N%z'));\nreturn $node;\n});\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Default encoder/decoder for XML::RPC::Fast\n\nIf MIME::Base64 is installed, decoder for \"XML-RPC\" type \"base64\" will be setup\n\nIf DateTime::Format::ISO8601 is installed, decoder for \"XML-RPC\" type \"dateTime.iso8601\" will be\nsetup\n\nAlso will be setup by default encoders for Class::Date and DateTime (will be encoded as\n\"dateTime.iso8601\")\n\nTy avoid default decoders setup:\n\nBEGIN {\n$XML::RPC::Enc::LibXML::TYPES{base64} = 0;\n$XML::RPC::Enc::LibXML::TYPES{'dateTime.iso8601'} = 0;\n}\nuse XML::RPC::Enc::LibXML;\n",
                "subsections": []
            },
            "IMPLEMENTED METHODS": {
                "content": "new\nrequest\nresponse\nfault\ndecode\nregisterType\nregisterClass",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "*   XML::RPC::Enc\n\nBase class (also contains documentation)\n\nQ: What is the legal syntax (and range) for integers? How to deal with leading zeros? Is a\nleading plus sign allowed? How to deal with whitespace?\n\nA: An integer is a 32-bit signed number. You can include a plus or minus at the beginning of a\nstring of numeric characters. Leading zeros are collapsed. Whitespace is not permitted. Just\nnumeric characters preceded by a plus or minus.\n\nQ: What is the legal syntax (and range) for floating point values (doubles)? How is the exponent\nrepresented? How to deal with whitespace? Can infinity and \"not a number\" be represented?\n\nA: There is no representation for infinity or negative infinity or \"not a number\". At this time,\nonly decimal point notation is allowed, a plus or a minus, followed by any number of numeric\ncharacters, followed by a period and any number of numeric characters. Whitespace is not\nallowed. The range of allowable values is implementation-dependent, is not specified.\n\n# int\n'+0' => 0\n'-0' => 0\n'+1234567' => 1234567\n'0777' => 777\n'0000000000000' => 0\n'0000000000000000000000000000000000000000000000000' => 0\n# not int\n'999999999999999999999999999999999999';\n\nCOPYRIGHT & LICENSE\nCopyright (c) 2008-2009 Mons Anderson.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Mons Anderson, \"<mons@cpan.org>\"\n",
                "subsections": []
            }
        }
    }
}