{
    "content": [
        {
            "type": "text",
            "text": "# HTML::Formatter (perldoc)\n\n## NAME\n\nHTML::Formatter - Base class for HTML formatters\n\n## SYNOPSIS\n\nuse HTML::FormatSomething;\nmy $infile  = \"whatever.html\";\nmy $outfile = \"whatever.file\";\nopen OUT, \">$outfile\"\nor die \"Can't write-open $outfile: $!\\n\";\nprint OUT HTML::FormatSomething->formatfile(\n$infile,\n'option1' => 'value1',\n'option2' => 'value2',\n...\n);\nclose(OUT);\n\n## DESCRIPTION\n\nHTML::Formatter is a base class for classes that take HTML and format it to some output format.\nWhen you take an object of such a base class and call \"$formatter-\"format( $tree )> with an\nHTML::TreeBuilder (or HTML::Element) object, they return the appropriately formatted string for\nthe input HTML.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **SEE ALSO**\n- **INSTALLATION**\n- **BUGS AND LIMITATIONS**\n- **AVAILABILITY**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::Formatter",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::Formatter - Base class for HTML formatters",
        "synopsis": "use HTML::FormatSomething;\nmy $infile  = \"whatever.html\";\nmy $outfile = \"whatever.file\";\nopen OUT, \">$outfile\"\nor die \"Can't write-open $outfile: $!\\n\";\nprint OUT HTML::FormatSomething->formatfile(\n$infile,\n'option1' => 'value1',\n'option2' => 'value2',\n...\n);\nclose(OUT);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 37,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "INSTALLATION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS AND LIMITATIONS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::Formatter - Base class for HTML formatters\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.12\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use HTML::FormatSomething;\nmy $infile  = \"whatever.html\";\nmy $outfile = \"whatever.file\";\nopen OUT, \">$outfile\"\nor die \"Can't write-open $outfile: $!\\n\";\n\nprint OUT HTML::FormatSomething->formatfile(\n$infile,\n'option1' => 'value1',\n'option2' => 'value2',\n...\n);\nclose(OUT);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "HTML::Formatter is a base class for classes that take HTML and format it to some output format.\nWhen you take an object of such a base class and call \"$formatter-\"format( $tree )> with an\nHTML::TreeBuilder (or HTML::Element) object, they return the appropriately formatted string for\nthe input HTML.\n\nHTML formatters are able to format a HTML syntax tree into various printable formats. Different\nformatters produce output for different output media. Common for all formatters are that they\nwill return the formatted output when the format() method is called. The format() method takes a\nHTML::Element object (usually the HTML::TreeBuilder root object) as parameter.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\nmy $formatter = FormatterClass->new(\noption1 => value1, option2 => value2, ...\n);\n\nThis creates a new formatter object with the given options.\n\nformatfile\nformatfromfile\n$string = FormatterClass->formatfile(\n$htmlsource,\noption1 => value1, option2 => value2, ...\n);\n\nReturn a string consisting of the result of using the given class to format the given HTML file\naccording to the given (optional) options. Internally it calls \"SomeClass->new( ... )->format(\n... )\" on a new HTML::TreeBuilder object based on the given HTML file.\n\nformatstring\nformatfromstring\n$string = FormatterClass->formatstring(\n$htmlsource,\noption1 => value1, option2 => value2, ...\n);\n\nReturn a string consisting of the result of using the given class to format the given HTML\nsource according to the given (optional) options. Internally it calls \"SomeClass->new( ...\n)->format( ... )\" on a new HTML::TreeBuilder object based on the given source.\n\nformat\nmy $renderstring = $formatter->format( $htmltreeobject );\n\nThis renders the given HTML object according to the options set for $formatter.\n\nAfter you've used a particular formatter object to format a particular HTML tree object, you\nprobably should not use either again.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "The three specific formatters:-\n\nHTML::FormatText\nFormat HTML into plain text\n\nHTML::FormatPS\nFormat HTML into postscript\n\nHTML::FormatRTF\nFormat HTML into Rich Text Format\n\nAlso the HTML manipulation libraries used - HTML::TreeBuilder, HTML::Element and HTML::Tree\n",
                "subsections": []
            },
            "INSTALLATION": {
                "content": "See perlmodinstall for information and options on installing Perl modules.\n",
                "subsections": []
            },
            "BUGS AND LIMITATIONS": {
                "content": "You can make new bug reports, and view existing ones, through the web interface at\n<http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format>.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "The project homepage is <https://metacpan.org/release/HTML-Format>.\n\nThe latest version of this module is available from the Comprehensive Perl Archive Network\n(CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you, or see\n<https://metacpan.org/module/HTML::Format/>.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   Nigel Metheringham <nigelm@cpan.org>\n\n*   Sean M Burke <sburke@cpan.org>\n\n*   Gisle Aas <gisle@ActiveState.com>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2015 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002\nGisle Aas.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
                "subsections": []
            }
        }
    }
}