What is Xpath? - XML

What is Xpath?

- A language for addressing specific parts of an XML document is known as an XPath.
- XPath is just like the Document Object Model (DOM), it models an XML document as a tree of nodes.
- A mechanism for navigating through and selecting nodes from the XML document is an XPath expression.
- This expression is, in a way, analogous to an SQL query which is used to select records from a database.
- Different types of nodes are included like element nodes, attribute nodes and text nodes.
- A string-value can be computed for each type of node is defined by the Xpath.
- A set of library standard functions for working with strings, numbers and boolean expressions are defined.

1. child::* - It selects all children of the root node.
2. .//name - It selects all elements having the name "name", descendants of the current node.
3. /catalog/cd[price>20.50] – It selects all the cd elements that have a price element with a value larger than 20.50.
Steps to transform XML into HTML using XSL - XML
The xsl:output element specifies how to display the result tree. The XSL processor produces the output result tree......
XHTML interview questions and answers - freshers, experienced
XHTML interview questions and answers for freshers and experienced, XHTML interview FAQ, XHTML Jobs
What is the DOM? - XML
DOM is a platform independent, World Wide Web Consortium (W3C) standard form of representation of structured documents as an object-oriented model.......
Post your comment