Monday, 5 May 2014

Difference between single and double slash in Xpath

Answer:
 /
  1.  start selection from the document node
  2. allows you to create 'absolute' path expressions
  3. e.g. “/html/body/p” matches all the paragraph elements
 //
  1.  start selection matching anywhere in the docume
  2. allows you to create 'relative' path expressions
  3. e.g. “//p” matches all the paragraph elements