xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hodges <harmo...@swbell.net>
Subject Re: Question about document type nodes and JAXP
Date Tue, 17 Oct 2000 03:28:17 GMT

----- Original Message -----
From: "Dane Foster" <dfoster@equitytg.com>
To: <general@xml.apache.org>
Sent: Monday, October 16, 2000 4:17 PM
Subject: Re: Question about document type nodes and JAXP

> I'm having trouble understanding why you would want to duplicate an XML
> document in memory.  Please explain.

We serialize XML documents between different processes over RMI.  We also
save them in databases.  It isn't a simple duplication; the original
document is on some other machine.  When the client receives a serialized
XML document, it isn't in DOM format (because DOM classes aren't
serializable).  So we have our own lightweight classes that can represent
all the DOM nodes.  The client gets these nodes and asks them to put build a
DOM document.  Since Document Type is just another node, Document doesn't
know anything about it when it is first created.

I'll probably change our design so that DocumentType isn't a node at all,
but an attribute of Document.  I guess I was misled by the fact that in DOM,
DocumentType extends Node.

View raw message