Consider a complete XML Parser generally consisting of several parts:
Necessary component:
1. DOM interface definition, and the implementation of DOM MODEL. 2. An XML lexical analyzer for converting XML character streams into a Token stream. 3. A XML Parser, organize the Token stream into Dom Model.4. A set of data structures and algorithms traversed in Dom Node, NodeItrator, Treewalker.5. A DTD lexical analyzer and DTD Parser.6. A XPath expression The compiler of the language is compiled into an AST tree. 7. An XPATH engine performs operations based on the DOM tree according to XPath AST. 8. A XSLT engine, complete the TRANSFORM of XSLT. 9. If you need to support XHTML, CSS Parser is also required.
Auxiliary components:
1. Memory management mechanism. 2. Supports File Reader.3. COM package for various coding and network environments.