extracted CollectionParser, added XmlGenerator