JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
Creating Documents
«Prev
XML Introduction
XML Explanation
Describe Markup Languages
Define XML Metalanguage
Metalanguage Relationships
Lmitations of HTML
XML Intelligence
Describing Intelligent Terms
XML Goals
Approaches using XML
XML Conclusion
Creating XML Documents
XML Document Rules
Well Formed XML
DTD Basics
Beyond Well Formedness
DTD Defined
DTD Creation Process
Element Type Declarations (L5)
Defining DTD - Quiz
Mixed Content Elements
XML Mixed Content
Referencing DTD Declarations (L7)
DTD XML File
File Declarations
DTD Checklist
Simple Complex DTD
XML Document - Quiz
Attributes Entities
Declaring Attributes - DTD
Defining Entities
XML Schemas
XML Parsers
Structure of XML Documents
XML documents form a tree structure that starts at "the root" and branches to "the leaves".
XML Tree Structure
XML documents are formed as element trees.
An XML tree starts at a root element and branches from the root to child elements.
All elements can have sub elements (child elements):
Discerning structure and the Structure of sample documents
Examine this basic business letter. What do you see in terms of structure? Remember that for this course, we are not concerned with the internal formatting of the document.
One very basic way of structuring the data in the business letter.
An XML structure for the document could be written like this (tags are in bold print to make them easy to see). This example shows proper, albeit general, structure. A more specific structure could bring even greater benefits. In the next example, we will add a great deal more specificity.
Same letter structured into more specific pieces of information. In this example, a lot more specifiy has been added. However this specifity requires much more work for the user, who will have to encode the letter.
XML code for the version of the business letter in the previous frame. Remember that XML is case-specific. You can choose to use any capitalization scheme you desire, but you must adhere to your choice strictly.
While the above is in fact a well-formed document strictly in a syntactical sense, it will mean nothing from a human point of view. What is the significance of Hrumph or bL?
You see that well-formedness is useless without a sensical structure ad humanly recognizable context.
One of the most appropriate examples of XML usage is describing elements in a product list or catalog.
The catalog data represented in XML
Documents that are well-formed create natural tree-like structures that stem from the root. Consider the tree structure of the book catalog you just examined. This figure demonstrates one way in which you could represent this tree visually.