Google News
XPath Interview Questions
XPath stands for XML Path Language. It is defined as a query language for selecting nodes from an XML document. It is used to find values such as strings, numbers, or Boolean values from the content of an XML document. It is generally used to navigate through elements and attributes in an XML document. It adopts path like syntax to identify and navigate nodes in an XML document. It uses syntax for defining parts of an XML document It contains a library of standard functions. It follows the W3C(World Wide Web Consortium) recommendation.
XPath Path Expressions are a combination of variables and operators. To select nodes or node-sets in an XML document XPath uses path expressions that are used in JavaScript, Java, XML Schema, PHP, Python, C and C++, and lots of other languages. It looks like the expressions with a traditional computer file system.
XPath stands for is used to find the location of any element on a webpage or to navigate through elements and attributes in an XML document.
XPath is a major element in the XSLT standard.

* It is syntax for defining parts of an XML document.
* XPATH stands for XML Path Language.
* It is used for navigating in XML documents.
* It can be used to query data from XML documents.
* It uses path expressions to navigate in XML documents.
* XPATH expressions are case sensitive.
XPath defines a pattern or path expression to select nodes or node sets in an XML document. These patterns are used by XSLT to perform transformations. XPath specifies seven types of nodes that can be output of the execution of the XPath expression.
* Root
* Element
* Text
* Attribute
* Comment
* Processing Instruction
* Namespace
There are two types of location paths used to specify the location of node in XML documents. These paths are absolute or relative path.
An absolute path starts with root node or with '/'.
For Example :
/company/employee - It will select employee nodes within class root node.
An atomic value is a value in or an instance in the value space of an atomic type defined by XML Schema. Atomic values are consists of strings, integers, decimals, dates, etc. and these values are known as atomic because it cannot be subdivided.
Xpath Node is defined as a point where the path address initiates, as it follows a concept of nodes. Basically, it is an individual element of the Xpath hierarchical structure which is termed as a node and enables an XSL processing.
XPath uses operators on nodes such that it returns either a node-set, a string, a Boolean, or a number. Some of the examples are addition, subtraction, Multiplication, etc.