>>>>> On Tue, 17 Jul 2001, "Rolf" == Rolf Jakob wrote:
Rolf> For an XML editing application I would like to copy a
Rolf> node from one DOM to another.
I have advice for using the DOM (in any implementation) for
XML editing applications:
Don't
I've been working on a Real Work (tm) project involving editing
XML for about 6 months. Sadly, when I got started Xerces C had
some functionality problems in the area of entity references
that made it unusable to me. So, since my part of the project
was Windows only and the project was only going to last 2 months
(rueful grin), I went over to the Dark Side and used MSXML.
Another part of our project lives on a Web Server and I believe
they're using Xerces J but they're not "round tripping" the XML.
But, regardless of the particular implementation, the DOM Level
1 API is NOT SUITABLE for a lot of applications that alter XML.
My own show stopper was that I needed to be able to create
user-defined entity definitions and change user-selected bits
of text into entity references. That's when I discovered that
everything in the DOCTYPE is read-only in the DOM. I ended
up using MSXML to parse the input file, walking the DOM tree
creating a similar tree of my own devising, and then deleting the
DOM tree. I believe that I would have had to do the same thing
if I had ended up using Xerces (or I would have hacked the
Xerces source to allow operations illegal in DOM level 1).
--Hal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]