My recomendation is SAX. You are obviously not interested in the DOM tree after parsing. Why then waste time building it?
 
Regards

Erik Rydgren
Mandarinen systems AB
Sweden

-----Original Message-----
From: Vinay Kakade [mailto:[EMAIL PROTECTED]]
Sent: den 2 januari 2002 08:56
To: [EMAIL PROTECTED]
Subject: Whether to use SAX or DOM?

Hi All,
 
I am facing a design decision problem regarding whether to use Xerces C++ SAX or
DOM parser. The requirements are as follows:
 
I want to prepare a generalized (nested) linked list (so that it may contain other linked lists)
from the data in a configuration file in XML format. Then
the user will do various operations on the linked list such as add, modify,
delete nodes and can also save the modified data in the linked list back to
the configuration file.
 
I want to know whether I should use SAX or DOM parser in parsing the configuration
file.
**If I use DOM parser, I need to update the DOM tree for each operation on the
linked list such that the linked list and the DOM tree are in sync. For saving data
to configuration file, I need to traverse the DOM tree and write it to output file.
**If I use SAX parser, for saving data to confoguration file, I need to traverse the
linked list and generate XML from it.
 
Please let me know which parser should I use from the ease of implementation and
efficiency point of view.
 
Thanks in advance,
-Vinay Kakade

Reply via email to