Archive for September, 2009

XML: SAX or DOM? (0)

September 22nd, 2009 by Frank Niedermann, under Java.

There are some differences between the SAX and DOM XML parser. The main difference in one sentence are:

1. SAX reads the XML document once and can react on events but it won’t save the XML structure in memory.

2. DOM reads the XML document and stores it in a tree which allows manipulation or to extract information from the XML document more than once.

SAX is easy and fast, DOM builds a tree and allows manipulation.

Tagged with , , , .