Moved ScalaXmlDocument to own source file (and adapted it)