Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what's the difference between / and // in Xpath

 
Stephen Ferg
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's the difference between / and // in Xpath
 
Paul Clapham
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/ selects children of the context node, // selects descendants of the context node.
 
Stephen Ferg
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's the difference between children and descendants ? Do you mean "/" only selects its direct children and "//" selects children and grandchildren, etc ?

can you give a simple example showing the difference ?

Thanks!
 
Paul Clapham
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's what I meant. "Child" and "descendant" are standard terminology in XPath. I would really recommend you find some tutorials rather than trying to learn things by asking questions on forums.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic