implementing XmlWriteStream