2

Possible Duplicate:
Using JAXB to cross reference XmlIDs from two XML files

Let's consider following classes (it's not a real code, it just shows my problem):

class Currency {
    private String fullName;
    private String symbol;
    private String isoCode;
    ...
}

class Region {
    ...
    private List<Currency> acceptedCurrencies;
    ...
}

Now I would like to store all currencies and regions in separate XML files, rather than in one big file, so I would like to have something like "reference to external object".

How I imagine such xml-s:

 <currency>
      <fullName>euro</fullName>
      <symbol>€</symbol>
      <isoCode>EUR</isoCode>
 </currency>

 <region>
      <currencies>
           <currency>euro</currency> <!--  Currency.name is threaten as ID -->
      </currencies>
 </region>

Is it somehow possible (besides implementing own framework for this)?

Community
  • 1
  • 1

0 Answers0