Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Xpath '//' Notation 1

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I can't quite get my head round the '//' notation.

The books indicate '//' identifies a decendant of the current node. What is the difference between a child and a decendant?

Dazed and confused
 
If the path starts with a slash ( / ) it represents an absolute path to an element!

If the path starts with two slashes ( // ) then all elements in the document that fulfill the criteria will be selected (even if they are at different levels in the XML tree)!

hth

simon

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top