We have dealt with some basic XML concepts already, so now we are prepared to leap forward and take a closer look at this powerful language. The X in XML stands for eXtensible- in other words, the language can be extended to meet the requirements of a specific situation.
The one essential tool for reading and modifying XML is a “parser”. The term “parser” and “processor” are sometimes used interchangeably, although technically this is not correct. Any program that takes an XML file as its input and produces some output based on the XML files content is an XML processor. An XML browser is an example of processor, as are programs that create typesetting codes, synthesized speech or HTML pages based on XML document. A parser is software that performs the first step in processing an XML document. Rarely, if ever, will an XML parsers operate on it’s own. Rather, a parser is almost always used as part of an XML processor. The most basic task of a parser is checking the XML document for well-formed data, making sure the documents content follows the rules of XML syntax. All parsers perform this task, if the syntax is incorrect the parser will detect it. Most parsers can also check a document for validity by checking against DTD or Schema. While not all documents require validation, many do. The fact that the document is well-formed is not enough-the data must be structured properly for the processing software to work correctly. The final task the parser may perform is to make the content of the document, both markup and data, available to the processing software. SAX API or DOM API does this, we will deal with them later on. XML parsers do not usually exist as stand-alone application, most parsers are in the form of a software component, or class, that can be used by processing applications. The processing software interacts with the parser, making calls to the parser’s properties and methods to perform the needed tasks.