Create a simple DOM and having it serialize to:

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

use XML;
 
bundle Default {
  class Test {
    function : Main(args : String[]) ~ Nil {
      builder := XMLBuilder->New("root", "1.0");
      root := builder->GetRoot();
      element := XMLElement->New(XMLElementType->ELEMENT, "element", "Some text here");
      root->AddChild(element);
      builder->ToString()->PrintLine();
    }
  }
}