A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
How to map the enum in Castor XML
Joined: Jun 20, 2013
Jun 20, 2013 07:27:02
Please advice what way can I map a class if it contains the field enum.
I use Castor XML.
Thanks in advance.
Joined: Jan 18, 2011
Jun 23, 2013 03:44:46
map a class if it contains the field enum
a class: named EnumContainer mapped to enum-container element
a field: named fieldEnum of Enum SimpleEnum (of bare minimal Enum) mapped to field-enum element
The child block <class> within the <mapping> of the mapping file would look something like this.
<class name="EnumContainer"> <map-to xml="enum-container" /> <field name="fieldEnum" type="SimpleEnum"> <bind-xml name="field-enum" node="element" /> </field> </class>
Potential to get more involved, but that's the bare minimal construction.
Don't get me started about those stupid
subject: How to map the enum in Castor XML
Problem with use Castor from Spring OXM.
Internal working of Castor
Specify namespaces in mapping file
XML to Java object using JAXB
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014