thanks Keith.

-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2002 21:11
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] appending serialized objects - still a
problem!




Derrick Pisani wrote:
>
> Erik thanks for your reply, Ilooked into Keith's reply to John Ferguson's
> question and I came up with this code:
>
>     public void processNode(TraversalPath traversalNodes_, File xmlFile_){
>       TraversalPath traversalNodes = traversalNodes_;
>       String fileName = xmlFile_.getPath();
>       String temp;
>       boolean check = false;
>       int indent = 0;
>       try {
>         FileWriter writer = new FileWriter(fileName, true);
>         Marshaller myMarshaller = new Marshaller(writer);
>         myMarshaller.setMarshalAsDocument(false);
>         myMarshaller.marshal(traversalNodes, writer);

Your problem is here...you are using a static method, and therefore
the setMarshalAsDocument(false) has no effect.

Change this line to:

myMarshaller.marshal(traversalNodes);

--Keith

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

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

Reply via email to