What is DOM?
DOM is Document Object Model APIs designed to allow programmers to access their information without having to write a parser in their programming language of choice. Thus by using either DOM or SAX APIs your program is free to use whatever parser it wishes. These APIs are available in all languages (java. C++. Etc). The Textual information in your XML document gets turned into a bunch of Tree nodes wherein you can access your information only by interacting with this tree of nodes. DOM preserves the sequence of elements that it reads from XML document because for DOM it really matters because DOM by default creates an object model for you.