Chapter 2 An XML Primer

 

“In reality, XML just clears away some of the syntactical distractions so that we can get down to the big problem: how we arrive at common understandings about knowledge representation” – John Bosak

 

XUL files adhere to the syntactic rules specified by the extensible markup language (XML).  This chapter starts by precisely defining XML and then proceeds to examine all the key components.  After reading this chapter, you will be able to construct both well-formed and valid XUL files.

The name “extensible markup language” is a misnomer since it is not a language.  A language has a vocabulary and a grammar.  XML has neither.  XML is a language specification, and thus, is a set of rules for constructing markup languages.  So, XML is a set of rules for defining a markup language.  But, what is a markup language?  The most common example is the Hypertext Markup Language (HTML).  HTML is a markup language that defines a hypertext document.  A hypertext document is a multimedia document that can include links to other documents.  In order to specify the formatting and placement of content in the document special tags are used that have specific meaning to an application program (called a hypertext browser) that renders the document.  It is these tags that are called “markup”.  Listing 2.1 is a simple document to demonstrate the HTML markup language.