<?php

namespace apexl\Utils\Xml;

use DOMDocument;

class Format
{
    public static function formatXml(string $xml): false|string
    {
        $dom = new DOMDocument('1.0');
        $dom->preserveWhiteSpace = true;
        $dom->formatOutput = true;
        $dom->loadXML($xml);

        return $dom->saveXML();
    }
}
