You definately don't need to use the code that I posted earlier. Use the
SourceGenerator to generate classes that represent your XML instances as
java objects. Its pretty simple actually. The castor website has all the
info you need.
It sounds like your schema will be static so you can just generate the
classes with the command line SourceGenerator. The generated classes have a
static unmarshal method that takes an XML file as a parameter and returns a
java object. You can then set all of the fields using the generated set
methods, and then you just call the marshal method on the object and it
returns XML. Presto, you have modified the XML and you can send it back over
SOAP or whatever.
-----Original Message-----
From: Dan Schmierer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 5:20 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Using Castor to generate java objects at
runtime from an XSD instance
Thanks for the replies, I think I was a little ambiguous about what I was
trying to do. Ok, via SOAP I receive a string for the time being that
contains XML that adheres to a particular xml schema definition. I would
like to put this xml into an object at runtime, so that I may change the
values of particular fields of that xml schema instance and then send it
back to the sender. How would I use castor to accomplish this? The
documentation is pretty low on examples.
Cheers
Dan Schmierer
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev