Hi Wolfgang,
Thanks for your answer! But it is again a bit too generic. Can you provide a
bit more JAXB-specific information related to your answer?
I do disagree with you.
As you may know, there are a lot of configuration files for different
systems written in XML syntax, e.g. Maven and its POM files. In most of such
systems, names of the properties (even when they are not known in advance)
are represented as element names. Values of those properties are then values
of these elements. And this works perfectly in many systems.
Also Java, if I'd stop using JAXB, and try to use low-level XML processing
would allow me to produce any XML that I like. But JAXB + Schema-based
approach is probably too restrictive.
Therefore, I'm asking how to "break out" of this XML Schema wall for some
well-defined subsets of my overall objects graph. I'd like the OVERALL graph
of JAXB-annotated objects to be still mapped by JAXB and for SPEICIFIC
SUBSETS I'd like to tell JAXB that I'd do marshalling/unmarshalling ON MY
OWN. I understand, that I loose Xml schema properties for this subset, but I
can live with it and it is still valid Xml fragment.
Do you see my point?
Wolfgang Laun-2 wrote:
>
> My understanding of XML Schema is that <xs:element>s are static components
> of their parent <xs:element>. This maps to Java classes, where elements
> are
> represented as fields.
>
> Using tags to represent what is actually data (as opposed to field
> selector)
> would also cause problems with other XML processors such as XSLT.
>
> Feel free to disagree ;-)
> -W
>
--
View this message in context: http://old.nabble.com/Custom-mapping-for-Maps-in-JAXB-tp28779221p28922379.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.