Create a simple DOM and having it serialize to:

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

val xml = <root><element>Some text here</element></root>
scala.xml.XML.save(filename="output.xml", node=xml, enc="UTF-8", xmlDecl=true, doctype=null)