Hello Rolf,<br>I've been doing some experiments with a software called EditiX that can creates Java classes from a XML file. I've used JDOM on those classes to accomplish what I've been trying.<br>The description of the solution I've figured out is here: <a href="http://www.alexandre-santos.com/Cars2Java.html">www.alexandre-santos.com/Cars2Java.html</a><br>
<br>Alexandre<br><br><div class="gmail_quote">On Wed, Dec 14, 2011 at 3:08 PM, Rolf <span dir="ltr"><<a href="mailto:jdom@tuis.net">jdom@tuis.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Alexandre<br>
<br>
You seem to be stating two different requirements:<br>
1. output data in XML according to a schema<br>
2. 'generate Java classes for JDOM'<br>
<br>
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.<br>
<br>
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 ?<br>
<br>
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.<br>
<br>
Hope this helps (though I don't think JDOM will be very useful for either of those issues).<br>
<br>
Rolf<div><div></div><div class="h5"><br>
<br>
On 14/12/2011 9:06 AM, Alexandre Santos wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hi! I'm involved in a project were I need to output data in XML<br>
according to a XSD Schema. Is there a tool to generate Java classes for<br>
JDom? The project uses Java 1.2.1 (yes, very old) and I can't use those<br>
newer things like JAXB or XMLBeans...<br>
Alex<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
To control your jdom-interest membership:<br>
<a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com" target="_blank">http://www.jdom.org/mailman/<u></u>options/jdom-interest/<u></u>youraddr@yourhost.com</a><br>
</blockquote>
<br>
</blockquote></div><br>