Is it possible to map an element name to a field's value in a class instead of class name?
For example, I want to map Java classes to the following xml:
<people>
  :
  <relationships>
    <rel-a ...> ...  </rel-a>
    <rel-b ...> ...  </rel-b>
    :
    :
    <rel-xxx>  </rel-xxx>
  </relationships>
</people>
 
  One way is to use the "location" attribute in "bind-xml" element to list all relationships. But this results in a long public variable lists and big mapping file. I know I can create a class for relationship and map to the following:
<people>
  :
  <relationships>
    <relationship name="rel-a" ..> .... </relationship>
    <relationship name="rel-b" ..> .... </relationship>
  :
  </relationships>
</people>
  But I kind of stuck with the XML format that was given to me.
 
  Thanks a lot for the help and a great product!

--
Alex Lee

Reply via email to