R4R
Right Place For Right Person TM
 
R4R XPath FAQS xpath Subjective Questions And Answers

 



Tolal:6 Click: 1
Previous Home Next

XPATH Interview Questions And Answers

Page 1

Ques: 1 What is XPath?

Ans:
We use Xpath language to findout the infomation in an XML document. Using XPath we can define the parts of an XML document.XPath is an main element in XSLT. Using XPath in an XML document we can perform navigation through elements and attributes.XPath has W3C Recommendation since 16 Nov 1999.

Ques: 2 What type of standard functions are in XPath?

Ans:
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.

Ques: 3 How you define nodes in XPath?

Ans:
XPath provide us seven kinds of nodes.These are: 1.element 2.text 3.processing-instruction 4.comment 5.namespace 6.attribute 7.document node(root node). In XML documents nodes are structured as tree.And the root of the tree is called as document node(root node) in an XML document. I have given example which show you how to manage nodes in XML. <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title lang="en">Parallel Algorithm</title> <author>Rashmi Sharma</author> <year>2008</year> <price>150.00</price> </book> </bookstore> Now, I explain you above example interms of node. <bookstore> (document node or root node) <author>Rashmi Sharma</author> (element node) lang="en" (attribute node)

Ques: 4 What is Atomic values?

Ans:
Nodes that has no parent node or child node are called as Atomic values.Than we can say that items are an example of Atomic values. Example: Rashmi Sharma "en" 2008 150.00

Ques: 5 How you define relationship among nodes?

Ans:
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.

Ques: 6 How you define XPath Axes?

Ans:
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.


Goto Page:

1
Share |

XPATH Objective

XPATH Objective Questions And Answers

XPATH Interview Questions And Answers

XPATH Interview Questions And Answers

R4R,XPATH Objective, XPATH Subjective, XPATH Interview Questions And Answers,XPATH,XPATH Interview,XPATH Questions ,XPATH Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R