HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
In XQuery, there are seven kinds of nodes: element, attribute, text, namespace, processing instructions, comments, and document node (or root node).
In XQuery, there are seven kinds of nodes: element, attribute, text, namespace, processing instruction, comment, and document (root) nodes. XML document is treated as a node tree. Root of the tree is called the document node or root node.
Consider the following XML document:
The above XML document node examples:
The basic value is no father or no child nodes.
Examples of basic values:
Project is the basic values or nodes.
Each element and attribute has one parent.
In the following example, book element is the parent title, author, year, and price elements:
Node element can have zero, one or more children.
In the following example, title, author, year, and price elements are all children of the book element:
It has the same parent node.
In the following example, title, author, year, and price elements are brothers:
The parent of a node, and the parent's parent, and so on.
In the following example, the ancestors of the title element are the book element and the bookstore element:
Child of a node, sub-sub, and so on.
In the following example, bookstore offspring is book, title, author, year, and price elements: