modified XmlGenerator