1.

What Is Path Expression In Xpath?

Answer»

XPath uses a path expression to select NODE or list of nodes from an xml document. Following is the list of useful paths and expression to select any node/ list of nodes from an xml document.

Expressions:

  • node-name: Select all nodes with the given name "nodename"
  • /: Selection starts from the root node
  • //: Selection starts from the current node that match the selection
  • .: Selects the current node
  • ..: Selects the parent of the current node
  • @: Selects attributes
  • STUDENTEXAMPLE − Selects all nodes with the name "student"
  • class/student: Example: Selects all student ELEMENTS that are children of class
  • //student: Selects all student elements no matter where they are in the document

XPath uses a path expression to select node or list of nodes from an xml document. Following is the list of useful paths and expression to select any node/ list of nodes from an xml document.

Expressions:



Discussion

No Comment Found