{
    "content": [
        {
            "type": "text",
            "text": "# XML::Grove::AsString (perldoc)\n\n## NAME\n\nXML::Grove::AsString - output content of XML objects as a string\n\n## SYNOPSIS\n\nuse XML::Grove::AsString;\n# Using asstring method on XML::Grove::Document or XML::Grove::Element:\n$string = $xmlobject->asstring OPTIONS;\n$string = $element->attrasstring $attr, OPTIONS;\n# Using an XML::Grove::AsString instance:\n$writer = new XML::Grove::AsString OPTIONS;\n$string = $writer->asstring($xmlobject);\n$writer->asstring($xmlobject, $filehandle);\n\n## DESCRIPTION\n\nCalling `\"asstring\"' on an XML object returns the character data contents of that object as a\nstring, including all elements below that object. Calling `\"attrasstring\"' on an element\nreturns the contents of the named attribute as a string. Comments, processing instructions, and,\nby default, entities all return an empty string.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS**\n- **EXAMPLES**\n- **AUTHOR**\n- **SEE ALSO** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::Grove::AsString",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::Grove::AsString - output content of XML objects as a string",
        "synopsis": "use XML::Grove::AsString;\n# Using asstring method on XML::Grove::Document or XML::Grove::Element:\n$string = $xmlobject->asstring OPTIONS;\n$string = $element->attrasstring $attr, OPTIONS;\n# Using an XML::Grove::AsString instance:\n$writer = new XML::Grove::AsString OPTIONS;\n$string = $writer->asstring($xmlobject);\n$writer->asstring($xmlobject, $filehandle);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Here is an example of entity mapping using the Text::EntityMap module:",
            "use Text::EntityMap;",
            "use XML::Grove::AsString;",
            "$htmlisodia = Text::EntityMap->load ('ISOdia.2html');",
            "$htmlisopub = Text::EntityMap->load ('ISOpub.2html');",
            "$htmlmap = Text::EntityMap->group ($htmlisodia,",
            "$htmlisopub);",
            "$element->asstring (EntityMap => $htmlmap);"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 1,
                "subsections": [
                    {
                        "name": "perl",
                        "lines": 2
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::Grove::AsString - output content of XML objects as a string\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use XML::Grove::AsString;\n\n# Using asstring method on XML::Grove::Document or XML::Grove::Element:\n$string = $xmlobject->asstring OPTIONS;\n$string = $element->attrasstring $attr, OPTIONS;\n\n# Using an XML::Grove::AsString instance:\n$writer = new XML::Grove::AsString OPTIONS;\n\n$string = $writer->asstring($xmlobject);\n$writer->asstring($xmlobject, $filehandle);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Calling `\"asstring\"' on an XML object returns the character data contents of that object as a\nstring, including all elements below that object. Calling `\"attrasstring\"' on an element\nreturns the contents of the named attribute as a string. Comments, processing instructions, and,\nby default, entities all return an empty string.\n\n*OPTIONS* may either be a key-value list or a hash containing the options described below.\n*OPTIONS* may be modified directly in the object. The default options are no filtering and\nentities are mapped to empty strings.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Filter\n`\"Filter\"' is an anonymous sub that gets called to process character data before it is\nappended to the string to be returned. This can be used, for example, to escape characters\nthat are special in output formats. The `\"Filter\"' sub is called like this:\n\n$string = &$filter ($characterdata);\n\nEntityMap\n`\"EntityMap\"' is an object that accepts `\"lookup\"' methods or an anonymous sub that gets\ncalled with the entity replacement text (data) and mapper options as arguments and returns\nthe corresponding character replacements. It is called like this if it is an object:\n\n$replacementtext = $entitymap->lookup ($entitydata,\n$entitymapoptions);\n\nor this if it is a sub:\n\n$replacementtext = &$entitymap ($entitydata,\n$entitymapoptions);\n\nEntityMapOptions\n`\"EntityMapOptions\"' is a hash passed through to the `\"lookup\"' method or anonymous sub, the\ntype of value is defined by the entity mapping package or the anonymous sub.\n\nEntityMapFilter\n`\"EntityMapFilter\"' is a flag to indicate if mapped entities should be filtered after\nmapping.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Here is an example of entity mapping using the Text::EntityMap module:\n\nuse Text::EntityMap;\nuse XML::Grove::AsString;\n\n$htmlisodia = Text::EntityMap->load ('ISOdia.2html');\n$htmlisopub = Text::EntityMap->load ('ISOpub.2html');\n$htmlmap = Text::EntityMap->group ($htmlisodia,\n$htmlisopub);\n\n$element->asstring (EntityMap => $htmlmap);\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Ken MacLeod, ken@bitsko.slc.ut.us\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "",
                "subsections": [
                    {
                        "name": "perl",
                        "content": "Extensible Markup Language (XML) <http://www.w3c.org/XML>\n"
                    }
                ]
            }
        }
    }
}