You might want to try Sun's JAXB

JAXB enables you to automatically create Java classes from a W3C XML Schema
The following citation from the JAXB FAQ describes the basic steps in using

After obtaining an XML Schema, you build and use a JAXB application by
performing these steps:
  1.. Generate the Java source files by submitting the XML Schema to the
binding compiler.

  2.. Compile the Java source code.

  3.. With the classes and the binding framework, write Java applications

    a.. Build object trees representing XML data that is valid against the
XML Schema by either unmarshalling the data from a document or instantiating
the classes you created.

    b.. Access and modify the data.

    Optionally validate the modifications to the data relative to the
constraints expressed in the XML Schema

    c.. Marshal the data to new XML documents.

I haven't tried it with the MODS schema.


Bas Peters

----- Original Message -----
From: "Prajakta Prakash Vaidya" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, February 03, 2004 3:18 PM
Subject: [MODS] Generating Java Objects for MODS Schema

> Hi,
> I am trying to create Java objects corresponding to the MODS schema. I
> am trying to use Castor for automatically generating these objects.
> However, I am running into some problems in doing this.
> Is there anyone who has tried generating Java objects for the MODS
> schema? If so, could you please specify any application used in the
> process and some details of it?
> Any help would be appreciated.
> Thanks,
> Prajakta