You could try directing the output of the Marshaller to a SAX document handler that serialises XML (such as org.apache.xml.serialize.XMLSerializer). First start your document and send your root node, e.g. handler.startDocument(); handler.startElement("Persons", ...) then marshal each Person object. Be sure to use the setMarshalAsDocument(false) method each time. Finally end your document, e.g. handler.endElement("Persons"; handler.endDocument();
-----Original Message-----
From: Folker Hagen [mailto:[EMAIL PROTECTED]]
Sent: 04 August 2001 12:13
To: [EMAIL PROTECTED]
Subject: [castor-dev] castor xml-marshalling
hi.
i have a problem with castors xml marshalling.
how is it possible to get two instances of a class(for example the
person example on the web site, class Person, instance person1 and
person2) into the same xml-file?
i tried to call the marshaller twice, but only the following happened to
the file:
<?xml version="1.0"?>
<person><name>Folker Hagen</name></person>
<?xml version="1.0"?>
<person><name>Wolfgang Lehner</name></person>
thanks for answering
folker
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
