Xml-based class generation