Vahan,
Why don't you place all these objects in an array of Objects (or some other
collection) and serialize the array?
> -----Mensaje original-----
> De: Vahan Harput [mailto:[EMAIL PROTECTED]
> Enviado el: domingo, 25 de julio de 2004 13:00
> Para: [EMAIL PROTECTED]
> Asunto: [castor-user] Marshalling multiple objects to the
> same XML file
>
>
>
>
> Hi,
>
> I would like to know whether it is possible with Castor to
> marshal several
> objects to the same XML file and then to unmarshal them from
> this file in
> the same order. Currently I am trying to do something like this:
>
> MyObject anObject, anotherObject;
> ..
> marshaller.marshal(anObject);
> marshaller.marshal(anotherObject);
> ..
> anObject = (MyObject) unmarshaller.unmarshal(reader);
> anotherObject = (MyObject) unmarshaller.unmarshal(reader);
>
> However I am getting an "SAXException: Parsing Error". It
> seems that the
> generated XML file is not valid.
>
> Any help would be appreciated.
>
> Thanks,
>
> Vahan Harput
> [EMAIL PROTECTED]
>
>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-user
>
> *************************************************************
> Este correo ha sido procesado por el Antivirus del Grupo FCC.
> *************************************************************
>
*************************************************************
Este correo ha sido procesado por el antivirus del Grupo FCC.
*************************************************************
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user