Modified generator code to be generated from xml.