Parsers

Software that interprets the information in XML documents is called an XML parser or processor. Parsers are generally built into other XML-compliant applications (such as web browsers or database servers), although standalone, command-line XML parsers do exist. It’s the parser’s job to pass elements and their contents to the application piece by piece for display or execution.

One of the things the parser does is make sure that the XML document is well-formed , that is, that it follows all of the rules of XML markup syntax correctly. If a document is not well-formed, parsers are instructed not to process it (although some are more forgiving than others). Well-formedness is discussed in the following section. Some parsers are also validating parsers, meaning they check the document for validity against a DTD.

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.