You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Richard Bolen <bo...@GretagMacbeth.com> on 2002/04/19 16:23:41 UTC

Difference between DOM and IDOM?

This is really more of a user question but...

What is the difference between the DOM and IDOM classes?  Are there advantages/disadvantages to using one or the other?

Is there any documentation that explains the differences?

Thanks,
Rich

--------------------------------------------------------------------
Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421		

http://www.gretagmacbeth.com/		
--------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Difference between DOM and IDOM?

Posted by Tinny Ng <tn...@ca.ibm.com>.
Someone asked me a similar question privately earlier, FYI my reply:

Some history information first:
'DOM' was the first "W3C DOM interface" developed by Xerces-C++.  However
the performance is not quite satisfactory.

Last year, a developer came up with a new design, 'IDOM', which seems to
perform much faster compared to the old design 'DOM'.    Currently both
'DOM' and 'IDOM' are shipped with Xerces-C++; and 'IDOM' is claimed as
experimental (like a prototype) and is subject to change.

As a long term strategy, Xerces-C++ shouldn't support two interfaces which
simply confuses users.   So now we come to a situation to decide if we
should deprecate the old 'DOM' and only support 'IDOM' or what else we
should do.    General users feedback indicate they like the fast performance
of IDOM, but they also prefer the automatic memory management of the old
DOM.   So currently there is an open discussion in the mailing list and a
bugzilla bug 5967 to see if we can integrate the best of two.

So to answer your questions:
> what's the difference between DOM and IDOM
DOM has automatic memory management and is Java-like (no pointers).  But it
is slower.
IDOM requires some manual memory management and is C++-like (uses pointers).
It is faster.  It is claimed as 'experimental' and 'subject of change' at
this moment.

> So is it true that IDOM interfaces are for DOM Level 2?
Both 'DOM' and 'IDOM' support DOM Level 2

> If I want to develop applications using Xerces-C++, which set of
interfaces should I use?
Since we currently have an open discussion about the right long term
direction which haven't closed yet,  I couldn't really give you a firm
answer at this moment.   Keep an eye on the mailing list, and you are
welcome to join the discussion to give us your feedback.   We hope to have
this clear by end of this month.

More information can be found in :
http://xml.apache.org/xerces-c/program.html
http://marc.theaimsgroup.com/?t=101650188300002&r=1&w=2
http://www.apache.org/~andyh/

Tinny

----- Original Message -----
From: "Richard Bolen" <bo...@GretagMacbeth.com>
To: "Xerces C++ Dev List (E-mail)" <xe...@xml.apache.org>
Sent: Friday, April 19, 2002 10:23 AM
Subject: Difference between DOM and IDOM?


This is really more of a user question but...

What is the difference between the DOM and IDOM classes?  Are there
advantages/disadvantages to using one or the other?

Is there any documentation that explains the differences?

Thanks,
Rich

--------------------------------------------------------------------
Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421

http://www.gretagmacbeth.com/
--------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: Difference between DOM and IDOM?

Posted by Markus Fellner <fe...@gimbio.de>.
I use IDOM in a complex multithreading application.
Each thread gets an pointer to the same document and gets/sets different
attribute values many times during runtime. The IDOM is used - so to speak -
as common data structure for data exchange between the thread modules.

My experiences are:
IDOM is threadsafe! DOM not (really)!
IDOM is fast! (in my tests about 5-10x faster than DOM)
IDOM is more elegant for C++ programmer. (I love pointers!)

BUT!!

There is a problem with memory management. Once allocated memory is not
deallocated up to the deletion of the overall document. If you change the
value of an attribute many times the memory of the old value is not
deallocated for reuse and the document grows and grows. The only change
getting the memory back is the deletion of the overall document.

Markus


-----Ursprüngliche Nachricht-----
Von: Richard Bolen [mailto:bolen@GretagMacbeth.com]
Gesendet: Freitag, 19. April 2002 16:24
An: Xerces C++ Dev List (E-mail)
Betreff: Difference between DOM and IDOM?


This is really more of a user question but...

What is the difference between the DOM and IDOM classes?  Are there
advantages/disadvantages to using one or the other?

Is there any documentation that explains the differences?

Thanks,
Rich

--------------------------------------------------------------------
Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421

http://www.gretagmacbeth.com/
--------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org