XML Logical Structure

HTML uses its tags as if they were style switches. The start tag turns a feature on, such as underlining, and an end tag turns it off again. XML uses its start tags and end tags as containers.

The start tag, the content, and the end tag all form a single element. Elements are the building bricks out of which an XML document is assembled. Each XML document must have only one root element, and all the other elements must be perfectly nested inside that element. This means that if an element contains other elements, those elements must be completely enclosed within that element.

If we sketch out the structure of the elements in this XML document, you’ll obtain the kind of tree structure of elements shown in figure below.

As we can see from figure , the document has a sort of tree-like structure, with the root element (&lthome.page>) at the top of the tree (or the base, depending on how you look at it). All the elements that are inside this element are neatly contained within each other. An XML document must contain one and only one root element, and there must not be any elements that are either partially or completely outside, before or after, that element.

To make it easier to refer to the relationships between elements and to elements with respect to other elements, we could say that an element is the parent of the elements that it contains. The elements that are inside an element are called its children. Elements that share the same parent element are called siblings.

In the simple example shown in Figure , &lthome.page> is the parent of all the other elements, &lttext> is the parent of &ltpara>, &lttitle> is a child of &lthead>, and &lttitle> and &ltbanner> are siblings. Going down the element tree, each child element must be fully contained within its parent element. Sibling elements may not overlap.

The arrangement of the elements in an XML document is called the logical structure. As you will see next, an XML document also has a physical structure. In order to be usable the logical and physical structure of an XML document must be synchronous; they must be completely and properly nested inside each other.

Related Post

XML anatomy part two
TESTING CONSTRAINTS PART TWO

LIFE CYCLE TESTING

TEST METRICS

Independent Software Testing

Test Process

Testing verification and validation

Functional and structural testing

Static and dynamic testing

V model testing

Eleven steps of V model testing

Structural testing

Execution testing technique

Recovery Testing technique


Operation testing technique


Compliance software testing technique

Security testing technique

No comments:

Post a Comment