What is XPath Terminology in XML
In this article I will explain the basic concept of XPath in Xml.
Introduction
In XPath their are many types of nodes,like element node, attribute node, root node,document nodes etc.In this article I will explain these node and also the concept of atomic values.Xml documents are treated as a trees of node,and the topmost element of the tree is known as root element.Lets us take an example of an Xml document.
Example
<?xml version="1.0" encoding="utf-8" ?>
<student>
<name>XYZ</name>
<rollnumber>32</rollnumber>
<address street="12">Delhi</address>
<phonenumber>123456789</phonenumber>
</student>
|
Now In the above example the meaning of each node is as
Root Node : <student> is the root element of the document.
Element Node: In the above example <name> XYZ </name> is the element node.
Attribute Node: street="12" is the attribute node.
Document Node: Document node is the combination of all the nodes that are used in the document.
Atomic Values
Atomic values are nodes with no children or parent. For example
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here