Although you can choose to fluff over these terms, I actually don't recommend it, if only for the purpose of job security. Several years ago, I used my understanding of terms to extend a contract when the client, who is widely known for being frugal, wanted to save money by having their employee mainframe programmers support a web application. During the turnover process, I described how the site worked using the precise web and XML terms. To make a long story short, the contract was extended for another two years.
The first concept is that, even with all the hoopla surrounding all things XML, it is essentially nothing more than data represented in a tree data structure. Looking at XML from an XPath perspective, XML consists of only seven types of nodes:
The root nodeonly one per XML document. All other nodes are child nodes of the root node.
Element nodes.
Text nodes.
Attribute nodes.
Comment nodes.
Processing instruction nodes.
Namespace nodes.
Note that DTDs (Data Type Definitions), CDATA sections, and entity references are not included in this list of node types, each for different reasons. Because a DTD is not an XML document, XPath is incapable of addressing it. CDATA, on the other hand, is a part of XML but, by design, is ignored by XPath, as are entity references.
In addition, it is important to note that the root element and the root node are not different terms for the same thing. Using the XML document shown in Listing 9-1, an XML document's root node contains both the processing instruction, , and the root element,
Listing 9-1. Example XML Document



0 comments:
Post a Comment