How to serialize XML file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to serialize XML file

brajesh.rathore

Hi,

I have read xstream tutorial.

It serialize the java object to XML.

 

But I want to serialize the complete XML file(in form of DOM object(Document)) to some Java

Object in Applet and send it to servlet running at server.

Later on I want to deserialize this Java object back to XML DOM object in Servlet at server side so that

I can parse the XML file.

 

Please help on it. Anybody have done it using xstream previously.

 

Regards

brajesh


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
Reply | Threaded
Open this post in threaded view
|

Re: How to serialize XML file

Jörg Schaible-2
[hidden email] wrote:

>
> Hi,
>
> I have read xstream tutorial.
>
> It serialize the java object to XML.
>
>
>
> But I want to serialize the complete XML file(in form of DOM
> object(Document)) to some Java
>
> Object in Applet and send it to servlet running at server.

XStream does not care of what type your output stream is.

> Later on I want to deserialize this Java object back to XML DOM object
> in Servlet at server side so that
>
> I can parse the XML file.

Well, you will receive an object, if you have deserialized it on the server
side ...

- Jörg