[jdom-interest] Class generator

Rolf jdom at tuis.net
Wed Dec 14 07:08:26 PST 2011


Hi Alexandre

You seem to be stating two different requirements:
1. output data in XML according to a schema
2. 'generate Java classes for JDOM'

In answer to 'outputting XML according to a schema': JDOM is not 
designed to (easily) build an XML document that matches an XSD schema. 
The best you can do is to build up an XML document in JDOM, then 
'stream' it through an XSD validating parser to make sure it conforms to 
the schema validations. JDOM does not provide an 'easy' way to do this.

On the second issue, I don't think I understand the request... you 
mention JAXB and XMLBeans as if you want to serialize/deserialize (any) 
Java classes as XML... or do you specifically want to know whether you 
can get JDOM to run on Java 1.2.1 ?

JDOM 1.1.2 should run fine on Java 1.2.1 (although I do not actually 
have a Java 1.2.x environment to test in), but JDOM does not provide any 
special tools for serializing/deserializing any Java classes. JDOM is 
not like XMLBeans or JAXB. It cannot do that for you.

Hope this helps (though I don't think JDOM will be very useful for 
either of those issues).

Rolf

On 14/12/2011 9:06 AM, Alexandre Santos wrote:
> Hi! I'm involved in a project were I need to output data in XML
> according to a XSD Schema. Is there a tool to generate Java classes for
> JDom? The project uses Java 1.2.1 (yes, very old) and I can't use those
> newer things like JAXB or XMLBeans...
> Alex
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list