The DOM is exactly that, an API to interact with nodes of a XML like document. XML and HTML are obviously different but the underlying structure isn't. You have different levels of DOM, usually only level one is implemented in most XML libraries. SAX is evented which means you don't have to read the whole XML document to be able to interact with it.
To be precise the DOM is 2 apis, one for OO languages(Elements with a type hierarchy) ,the other for C like languages (nodes)
To be precise the DOM is 2 apis, one for OO languages(Elements with a type hierarchy) ,the other for C like languages (nodes)