xml data binding using castor

V

vysh

Hi all,
I am using Castor framework for xml parsing.I am generating
the java source code from my schema file using the castor
SourceCodeGenerator .Now I m trying to unmarshall the xml file and
populate my beans.but,I am stuck up!!!.
My schema file has complex types,sequences other than the
normal elements.So when I am generating my source these complex types
are created as normal and abstract classes.
So in my mapping file I am not able to map these classes to my
elements as there are no elements of that type.Because of this my
unMarshall is not able to retrive the elements inside these classes.If
you do understand my issue, please reply me.

Waiting for your reply,

Thanks,
Vaisakh Unniskrishnan.
 
D

David Sharp

vysh said:
Hi all,
I am using Castor framework for xml parsing.I am generating
the java source code from my schema file using the castor
SourceCodeGenerator .Now I m trying to unmarshall the xml file and
populate my beans.but,I am stuck up!!!.
My schema file has complex types,sequences other than the
normal elements.So when I am generating my source these complex types
are created as normal and abstract classes.
So in my mapping file I am not able to map these classes to my
elements as there are no elements of that type.Because of this my
unMarshall is not able to retrive the elements inside these classes.If
you do understand my issue, please reply me.

I did a little bit of data binding with castor, and it was ok, but I
much prefer to use JAXB. Any reason you can't switch to JAXB?

Dave
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top