Option to create the main document containing comments, instructions, and first level nodes

Adds option to create the main document containing comments and first level nodes.

For a document like
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- blah blah blah -->
<project>
  <version>
     1.2.3
  </version>
</project>

Without creating main document you would access version with:
   xmlDoc.child('version')
   and the exported file would lose the processing instruction and the comment
with create main document:
   xmlDoc.child('project').child('version').
   and it mantains the xml processing instruction and the first comment.

This allows the correct export of the XML file only changing white spaces which was what I needed