Generate an XML in Java using an XML Schema

Discussion in 'Java' started by vmtigno@yahoo.com, Apr 18, 2006.

  1. Guest

    Hi,
    Is it possible to create an XML in Java using an XML Schema? Is the XML
    Schema just for validation?

    Thanks!
    V
     
    , Apr 18, 2006
    #1
    1. Advertising

  2. James McGill Guest

    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.
     
    James McGill, Apr 18, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raj
    Replies:
    0
    Views:
    2,641
  2. Markus
    Replies:
    1
    Views:
    1,640
    Markus
    Nov 23, 2005
  3. Replies:
    1
    Views:
    654
    Oliver Wong
    Apr 18, 2006
  4. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,314
    Stanimir Stamenkov
    Apr 25, 2005
  5. Matt
    Replies:
    3
    Views:
    362
    Bob Barrows [MVP]
    Apr 23, 2004
Loading...

Share This Page