We can say that XPath has more than 101 build-in functions.XPath given those build-in function that are used for boolean values, string values, numeric values, date and time comparison, sequence manipulation etc.
|
I have told you types of nodes. Example:
<book> <title>Parallel Algorithm</title> <author>Rashmi Sharma</author> <year>2008</year> <price>150.00</price> </book>
Parent : Only one parent node has possible with each element and attribute. In above example we can say that book element is the parent of title, author, year, and price.
Children : An element node may have zero, one or more children. In above example book element has children title, author, year, and price elements.
Siblings : We called siblings those element who has same parent. In above example we can say that title, author, year, and price elements are siblings.
Ancestors : We can say that ancestors are node\'s parent, parent\'s parent, etc. In above example the ancestors of the author element are the book element and the bookstore element.Ancestors of title, author, year and price elements are same.
Descendants : We can say that ancestors are node\'s children, children\'s children, etc. In above example. descendants of the book element are title, author, year, and price elements.
|
Using Axes we can set relation of current node with another node. Example: ancestor : Use to get all ancestor (parent, grandparent etc) of current node. ancestor-or-self : Use to get all ancestors (parent, grandparent, etc.) of the current node and also the current node. attribute : Use to get all attributes of the current node. child : Use to get all children of the current node. descendant : Use to get all descendants (children, grandchildren, etc.) of the current node. namespace : Use to get all namespace nodes of the current node. preceding : Use to get everything in the document that is comes before the start tag of the current node. preceding-sibling : Use to get all siblings before the current node.
|