Increasing numbers of applications that use XML to exchange, mediate, and store data, tools for effective management of XML data are becoming increasingly important nowadays. Which leads to increase in demand for tools which provide easier querying and transformation for XML data.

In particular, tools for querying and transformation of XML data are essential to extract information from large bodies of XML data, and to convert data between different representations (schemas) in XML. Just as the output of a relational query is a relation, the output of an XML query can be an XML document. As a result, querying and transformation can be combined into a single tool. Following mentioned are some tools/languages which provide facilities for transforming and querying XML data.

 

Xpath:

XPath is a language for path expressions, and is actually a building block for the remaining two query languages. A path expression in XPath is a sequence of location steps separated by “/” (instead of the “.” operator that separates steps in SQL:1999). The result of a path expression is a set of values, the XPath expression

/bank-2/customer/name

would return these elements:

<name>Joe</name>

<name>Lisa</name>

<name>Mary</name>

 

XSLT:

It was designed to be a transformation language, as part of the XSL style sheet system, which is used to control the formatting of XML data into HTML or other print or display languages. Although designed for formatting, XSLT can generate XML as output, and can express many interesting queries. Furthermore, it is currently the most widely available language for manipulating XML data.

 

XQuery:

It has been proposed as a standard for querying of XML data. The World Wide Web Consortium (W3C) is developing XQuery, a query language for XML. XQuery combines features from many of the earlier proposals for querying XML, in particular the language Quilt. Unlike XSLT, XQuery does not represent queries in XML. Instead, they appear more like SQL queries, and are organized into “FLWR” (pronounced “flower”) expressions comprising four sections: for, let, where, and return.

 

A tree model of XML data is used in all these languages. An XML document is modeled as a tree, with nodes corresponding to elements and attributes. Element nodes can have children nodes, which can be sub-elements or attributes of the element.

Tag

Related Post

Leave a Reply