I'm doing so with a little trick:
instead of a GenericXMLWriter (for instance), use the following:
GenericXMLWriter writer = new GenericXMLWriter(namespaces){
@Override
public void close() throws IOException
{
// no close
}
};
Then you'll be able to call several times mctx.marshalDocument(...) in
a loop, thus marshalling all your objects to the same stream.
I'm not sure this behavior is intented to be used, but it's a huge
performance gain too (re-use the same context).
Cheers,
Francois.
On 9/26/07, Dan Shuhler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is it possible to use JiBX to marshal more than one object into a single XML
> file? I have a large quantity of objects I need to marshal. Currently, I
> am putting them all into a container object and marshalling that, but
> loading so many objects at once puts a heavy strain on the system. I would
> prefer to load an object, marshal that data, load the next object, marshal
> that data, etc.
>
> I have not been able to find a way to marshal an object without have an XML
> header printed at the top and my output stream being closed. Is there
> something I am missing? Or is JiBX not intended for this?
>
> Thanks for your help,
> Dan
>
> ________________________________
> Pinpoint customers who are looking for what you sell.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users