SimpleXml how to correctly set encoding and xmins? SimpleXml how to correctly set encoding and xmins? xml xml

SimpleXml how to correctly set encoding and xmins?


new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>'                          .'<kml xmlns="http://earth.google.com/kml/2.2">'                          .'<Document></Document></kml>');