moovweb/gokogiri — pull request #62 by masterzen (2013-12-01 15:29:16+00:00)
Title: Feature: allow to create an XML document from scratch

It wasn't possible to set the root XML element, so it was only possible
to create new XML document by parsing an existing content.

This patch allows to build an XML document tree programatically:
doc := xml.CreateEmptyDocument(xml.DefaultEncodingBytes, xml.DefaultEncodingBytes)
e := doc.CreateElementNode("Envelope")
e.SetNamespace("env", "http://www.w3.org/2003/05/soap-envelope")
doc.SetRoot(e)

Please bear with me, it's my fist go code :)
Please review and comment!