Title: JDO: can't map boolean -> char[01]?
Mette:
 
The short answer to your question is to:
 
  • Instantiate and populate your bean
  • Marshal it to a file (e.g. Marshaller.marshal(writer, object))
  • Unmarshall it from the file (e.g. Unmarshaller.unmarshal(reader)).
 
You don't need any mapping files or descriptor classes to do this. However, the xml will wind up with extra type information in it that you wouldn't need if you had the mapping or descriptors.
 
Good Luck,
 
Tom Drake
----- Original Message -----
Sent: Tuesday, October 02, 2001 5:35 PM
Subject: [castor-dev] Rountrip example?

Are there any code examples on how to do a roundtrip of an XML document in Castor? What I mean by roundtrip is an application that loads an XML document into the beans, and then outputs it back out again.
 
As I understand it, this has to be done through the API, but I would like to see an example of it, to make sure I am going about it the right way. If there is a command line application that does this that I am not aware of, that would be great too.

Mette Hedin

Reply via email to