Create a simple DOM and having it serialize to:

 <?xml version="1.0" ?>
 <root>
     <element>
         Some text here
     </element>
 </root>

 
content_type( 'text/xml' );// set MIME type if serving
 
xml( '<?xml version="1.0" ?><root><element>Some text here</element></root>' );
 
 