File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes serializing solution for org.w3c.Node Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "serializing solution for org.w3c.Node" Watch "serializing solution for org.w3c.Node" New topic
Author

serializing solution for org.w3c.Node

manuel aldana
Ranch Hand

Joined: Dec 29, 2005
Posts: 308
Hi,

i want to transmit a Node through RMI. it is not possible to directly serialize it. has anyone an advice what is the standard solution to transform Node to a serializable format (-> maybe there is a mapping api for that).

first, i thought about transforming it to a String, but maybe there is a better way...?


aldana software engineering blog & .more
manuel aldana
Ranch Hand

Joined: Dec 29, 2005
Posts: 308
i had a try to pass Node through a remote interface. it worked. so it seems that the (passed) implementation of the Node implements the Serializable interface (i get an DeferredDocumentImpl).

but still i want to rely on the interface type Node (could be that someone passes a non Serializable object). that means i do not expect a Serializable type. that's why i still look for a transformer from Node to a serializable type and backwards.

thanks.
[ September 14, 2007: Message edited by: manuel aldana ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
The standard serialized form of objects implementing the org.w3c.dom.Node interface is an XML document - text in other words.

It is time to step back and figure out what you really need to send. Note that there are many kinds of interfaces extending Node, each one having different content and text representation. Get familiar with the JavaDocs for Node - especially the elegant summary table.

Bill
manuel aldana
Ranch Hand

Joined: Dec 29, 2005
Posts: 308
at both ends Node type is neccessary. think now that i will go for text transformation:

rmiClient.transformNodeToText -> rmiServerImpl.transformTextToNode
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: serializing solution for org.w3c.Node
 
Similar Threads
Node to Element conversion
JTree: How to update nodes?
Dyanamic Tree in jsp
Parsing a TreeModel structure
need help:dos based .clp to java gui