Kuldip Nijjar wrote:

Kuldip,

Please see my comments inline below:

I’m looking into using Castor and I have a couple questions.

I want map xml schema to Java objects inorder validate the data content of xml instance.

I’m able to generate Java code from the xml schema using the source code generator, but

do I need to create mapping file (by hand) as well?

The org.exolab.castor.tools.MappingTool will create a mapping descriptor for you from a base class. But the mapping descriptor that is created is usually not completely sufficient for use. This is because the MappingTool can't guess what values you want to use for every element in the mapping descriptor. Please see the following doc for more information on the mapping descriptor and it's content for use with Castor XML:


    http://www.castor.org/xml-mapping.html

Another question related the above.

Once I have successfully converted xml to Java objects, I want to connect to relational db

and summit queries about the java data objects. Can I use JDO for this or what? Again do

I need to create an JDO mapping file by hand?

Yes, Castor JDO can do this and you will need Castor JDO specific content in the mapping descriptor. Information on this can be found in the following doc:


    http://www.castor.org/jdo-mapping.html

In addition, I would recommend going through the Castor JDO examples located in src/examples/jdo and src/examples/myapp. Information on the JDO examples can be found in this doc:

    http://www.castor.org/examples.html

The JDO examples are a good place to begin because they're very basic.

HTH

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'


The Castor Project
http://www.castor.org/

Apache Geronimo
http://incubator.apache.org/projects/geronimo.html



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to