Improves XmlFormat, better text node support and fixes on encoding and decoding