How It Works
There are generally two files that are processed by an XML-compliant application to display XML content: the XML document and a style sheet (discussed in this section). In addition, some documents also use a Document Type Definition (DTD) that defines each tag allowed in the document along with its attributes and rules for use. The XML client can use the DTD to “decode” the markup and check it for accuracy. DTDs are discussed later in this chapter.
The software that interprets the information in XML documents is called a parser. Both Microsoft and Netscape have built XML parsers into the latest versions of their browsers (Internet Explorer 5.5 and higher and Netscape 6).
The XML Document
As we’ve seen at the beginning of this chapter, an XML document contains marked-up content and looks similar to HTML in that regard. While you may think of a document as containing paragraphs and headings, XML documents can contain a vast variety of content. An XML document might be text-based, like a magazine article, or it could contain only numerical data to be transferred from one database or application to another. An XML document might also contain an abstract structure such as a particular vector graphic shape or a mathematical equation.
It is important to note that an XML document is not limited to one physical file but may be made up of content from multiple files. Markup is used to integrate the contents of different files to form the logical structure of a single XML document. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access