
7
The Parser and DOM
The previous chapters showed how to view and transform XML documents.
Style sheet is a powerful technology but it is limited to viewing and trans-
forming. When you have more specific needs, you need to turn to program-
ming. This chapter introduces how to read XML documents from
JavaScript or Java.
In this chapter, you learn
• what an XML parser is
• how to interface a parser with an application
• what DOM, the Document Object Model, is
• how to write JavaScript applications that use DOM
• how to write Java applications that use DOM
• which other applications use DOM
What Is a Parser?
A parser is the most basic yet most important XML ...