It does answer my queries thanks.

However it does not address my problem hehehehe...

What I want to be able to do is take in a XML file perform a
transformation on this XML file so that only the fields or sub fields
I need are kept then I will persist this into a relatively generic
database table. The sub elements are to be retained as well as any
annotations that may exist.

Do you have any recommendations on how I should attempt this or do you
think this is really not possible.

Chris

On 9/17/07, Werner Guttmann <[EMAIL PROTECTED]> wrote:
> You are welcome. Does this address your questions/concerns ?
>
> Werner
>
> chris au wrote:
> > Hi Wener thanks for ths fast reply.
> >
> >
> > On 9/17/07, Werner Guttmann <[EMAIL PROTECTED]> wrote:
> >> Hi Chris,
> >>
> >> replies inline.
> >>
> >> Werner
> >>
> >> chris au wrote:
> >>> Hi,
> >>>
> >>> I was wondering whether it is possible to use castor to generate some
> >>> java objects from XML.
> >> One of the parts of Castor XML is a code generator that generates Java
> >> classes for an XML schema instance given to it. There's various ways of
> >> invoking this code generator, including e.g. an Ant task definition, a
> >> Maven plugin, etc.
> >>
> >> In addition, Castor's code generator creates a second set of Java
> >> classes, which we call 'descriptor' classes. These classes store all the
> >> meta information as present in the XML schema needed for XML data
> >> binding, i.e. marshalling and unmarshalling.
> >>
> >>> Currently I have been able to create a schema using castor and then
> >>> generate the appropriate java files against the schema created. What I
> >>> would like to know is whether it is possible to instantiate these
> >>> files for binding with my xml file immediately.
> >> Yes, that's not just an option, but the preferred way. When you used the
> >> code generator, you created two set of classes: your Java (domain)
> >> objects, and the descriptor classes. A descriptor class records
> >> information sich as e.g. XML element names, namespaces, etc., preserving
> >> the XML-related informations from your XML schema.
> >>
> >> With those two sets of classes, you can now start using the
> >> (Un)Marshaller immediately. Just to get one more point across: as you
> >> started from an XML schema and generated your Java classes and
> >> descriptor classes, there's no need to use a mapping file anymore.
> >> Mapping files are to be used with existing Java classes, which you want
> >> to use during (un)marshalling.
> >>
> >>> If not what would be
> >>> the recommendation.
> >>>
> >>> Thanks
> >>>
> >>> Chris
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe from this list please visit:
> >>>
> >>>     http://xircles.codehaus.org/manage_email
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list please visit:
> >>
> >>     http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to