I'm a bit confused. Lets assume I have this XML document:

<X>
~   <Y>
~      <!-- Whatever 1 -->
~   </Y>
~   <Y>
~      <!-- Whatever 2 -->
~   </Y>
</X>

I generate Java classes, and unmarshal a file, so that I
have an X object. Now, I do this:

~   x.marshal(new FileWriter("outfile.xml"));

I assumed that the X.marshal() function, in some way,
would recurse through its sub elements, and call its
Y.marshal() functions.

But, that is not the case. It seems to do something else.
I was hoping it did, because that would make it possible
for me to hack the generated marshal() functions, and in
some cases, for some Y objects, just skip the marshalling
for some elements, depending on a bunch of application
specific criteria.

Simply put, I want to make it possible for me to skip
the marshalling of some objects.

I know that I could simply remove them, but it would be
much faster for me to not remove them, since I want to
reuse the same objects over and over again.

Anyone that could help me understand?


Mats

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

Reply via email to