I need an efficient way to convert XML to meaningful domain objects in Java. Below is a selection of XML that I have to work with (some values have been obscured). Here are the basic constraints I have to work with:[*]There is no schema to work with. Auto-generated schemas don't turn out well because of the variable "nesting."[*]Any given domain-object can contain 0-* domain-object tags[*]Any given domain-object can contain 0-* value tags.[*]Not all nesting is created equal. In some cases, the "key" of a value includes implicit nesting. For example, "config[0].cbs" indicates a collection of config objects, each with a different value for .cbs[*]Changing the XML structure may not be possible.[*]The "represents" attribute indicates a type.[*]The "nestedKey" attribute indicates a variable name inside a type.[*]These XML files can be quite large.I've tried using JAXB, but things aren't working out because of the "generic-ness" of the tags. Perhaps my JAXB-fu is insufficient. The current implementation (I inherited this) is SAX, but it doesn't actually work. I've looked at XStream, but it seems to assume some semantic structure to the tags. I would like a least-code, most-flexible, most-extendable approach to generate meaningful domain objects. I'd like to avoid nesting HashMaps if possible (that's part of the current solution that doesn't work). Creative, hack-y, or clever ideas are welcome as well as striaght-forward "duh" answers too.XML Snippet:\[code\]<?xml version="1.0"?><domain-objects> <types language="C++"> <type prefix="bool" language-representation="bool" /> <type prefix="char" language-representation="char" /> <type prefix="domain_object" language-representation="opti:omainObject" /> <type prefix="domain_object" language-representation="DomainObject" /> <type prefix="double" language-representation="double" /> <type prefix="float" language-representation="float" />... </types> <domain-object key="(unique object id)" represents="PerfSuite"> <domain-object key="(unique object id)" nestedKey="testCore" represents="PerfTestCore"> <value key="suiteUuid" type="stl_string">(unique object id)</value> <value key="suiteName" type="stl_string">(some name)</value> <value key="suiteId" type="int">(some number)</value> <value key="suiteDeleted" type="bool">false</value> </domain-object> <domain-object key="(unique object id)" nestedKey="testResults" represents="PerfTestResults"> <domain-object key="(unique object id)" nestedKey="services_0" represents="PerfServiceResult"> <domain-object key="(unique object id)" nestedKey="stepResults_0" represents="PerfStepResult"> <value key="ir.max" type="int64">(some number)</value> <value key="ftd.avg" type="float">(some number)</value> <value key="ftd.max" type="float">(some number)</value>... </domain-object> <value key="duration" type="uint">(some number)</value> <value key="flow" type="uint16">(some number)</value>... <value key="config[1].flrThreshold" type="float">(some number)</value> <value key="config[1].fdvPercent" type="float">(some number)</value> <value key="index" type="uint16">(some number)</value> <value key="config[0].cbs" type="uint64">(some number)</value> <value key="svlanVid" type="uint16">(some number)</value> <value key="config[1].availThreshold" type="float">(some number)</value>...\[/code\]