Added some features to make it easier to create an xml document from scratch