Computer Science, asked by vissu1, 1 year ago

why is XML model called a tree model

Answers

Answered by Somnath11
1
In mathematics, a tree is an undirected graph in which any two vertices are connected by exactly one simple path. Any connected graph without simple cycles is a tree. A tree data structure simulates a hierarchical tree structure with a set of linked nodes. A hierarchy consists of a preorder defined on a set. The term hierarchy is used to stress a hierarchical relation among the elements.

The XML specification defines an XML document as a well-formed text if it satisfies a list of syntax rules defined in the specification. This specification is long, however 2 key points relating to the tree structure of an XML document are:

The begin, end, and empty-element tags that delimit the elements are correctly nested, with none missing and none overlappingA single "root" element contains all the other elements

These features resemble those of trees, in that there is a single root node, and an order to the elements. XML has appeared as a first-class data type in other languages. The JavaScript (E4X) extension explicitly defines two specific objects (XML and XMLList), which support XML document nodes and XML node lists as distinct objects and use a dot-notation specifying parent-child relationships. [1] These data structures represent XML documents as a tree structure.


vissu1: ok thanks
Similar questions