About XML Document Structure

The XPath processor operates on a tree representation of XML data that looks like the following figure:

The root node has no actual text associated with it. You can think of the file name as the root node. A document can include zero or more comments and zero or more processing instructions.

A document element is required, and there can be only one. The document element contains all elements in the document. For example:

In the preceding figure, bookstore.xml is the name of a file that contains XML data. There is a comment near the beginning of the document that starts with "This file represents a ..." The document element is bookstore. The immediate children of bookstore include an attribute, a namespace declaration (not supported by Stylus Studio), three book elements (one is in the my namespace), and a magazine element. The book and magazine elements contain elements and attributes, which are shown in the figure that appears in Tree Representation of a Sample XML Document.

ZapThink Report: Using Stylus Studio to Deploy XML Data Services

A Zapthink analyst discusses how to create the next generation of XML data services using Stylus Studio XML tools - Download the special report today for free.

Varying Record Layout to XML

Not every row in a text file has to have the same layout. Convert to XML has advanced pattern-recognition tools to route the data to where it belongs.

Convert DTD to XML

Learn how to create a sample XML instance document from a DTD using Stylus Studio DTD to XML conversion tools.

XML Programming

Simplify XML Programming with Stylus Studio's XML Pipeline, a powerful tool for modeling, programming, debugging and deploying complete XML programs.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member