• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 37. Toward XML > Understanding How XML Forms Logical Structures

Understanding How XML Forms Logical Structures

The nesting of elements is the only mechanism used to indicate logical structure in an XML document. The start and end tags in the text stream tell the XML processor that a node has been encountered.

If the XML processor encounters another start tag before the matching end tag, the processor knows that it's either on a new node in the tree or a leaf. If no new start tag is encountered and the end tag is found, the processor knows that this is a leaf and can proceed iteratively at that level of the tree until another start or end tag is encountered. Processing proceeds stepwise based on this simple rule. If the processor is validating the document, each node can be associated with a rule governing what sorts of content can appear within it. An empty tag is, by definition, a leaf because it can contain no further content.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint