|
INTERVIEW QUESTIONS
XML
XPATH
DETAILS
Question: How you define relationship among nodes?
Answer: 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.
|
|
|
Category |
XPath Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8860 users |
Added on |
4/29/2014 |
Views |
71098 |
Rate it! |
|
|
Question:
How you define relationship among nodes?
Answer:
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.
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How you define XPath Axes?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All XPath Interview Questions & Answers - Exam Mode /
Learning Mode
|