3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $outXML = '<vehicle id="8" identyfikator="23"> <name>MAREK</name> <recorder ppp="fdfd">8</recorder> <production-date>0</production-date> <registration-number>SI40996</registration-number> <fuel> <type> </type> <nominal>0</nominal> <drive>0</drive> <work>0</work> <stay>0</stay> </fuel> <attr> <at nam="EMAIL" typ="5">w@wp.pl</at> </attr> </vehicle>'; $xml = new DOMDocument(); $xml->preserveWhiteSpace = false; $xml->formatOutput = true; $xml->loadXML($outXML); var_dump($xml);