switched xml writing to TinyXml.