On Tue, 2006-04-18 at 09:43 -0700,
wrote:
>
> Is it possible to create an XML in Java using an XML Schema? Is the
> XML
> Schema just for validation?
Well, XML Schema isn't "just" for validation. It defines the structure
that a given document may have, which happens to be useful for
validation.
I use Castor to generate java objects from XSD. Those objects are
essentially beans, which can be marshalled or unmarshalled to or from
XML, with or without validation. Castor isn't a JAXB implementation,
but it works really well, very efficient, and I like it a lot.
There are plenty of other options for binding data objects to XML, but I
don't know which ones build or validate against a schema. Like I said,
Castor solved all my data binding problems.