Habari\AtomHandler::tidy_xml PHP Метод

tidy_xml() защищенный Метод

Use Tidy to tidy XML output for debugging by humans
protected tidy_xml ( string $xml ) : string
$xml string The unformatted input XML
Результат string Formatted XML
    protected function tidy_xml($xml)
    {
        if (!DEBUG) {
            return $xml;
        }
        // Tidy configuration -- make xml readable
        if (class_exists('tidy', false)) {
            $config = array('indent' => true, 'output-xml' => true, 'input-xml' => true, 'wrap' => 200);
            $tidy = new \tidy();
            $tidy->parseString($xml, $config, 'utf8');
            $tidy->cleanRepair();
            $xml = $tidy;
        }
        return $xml;
    }