



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Xpath and xquery are languages used for navigating and extracting data from xml documents. Xpath provides a 'path like' syntax for identifying nodes, while xquery is a query language for extracting elements and attributes. Both are w3c recommendations and are supported by various xml processing libraries and tools. Rdf, the resource description framework, is an application of xml used for describing internet resources and their metadata.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




XPath ( XML Path Language ) is a query language for selecting nodes from an XML document. In addition, XPath may be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document. XPath was defined by the World Wide Web Consortium (W3C).[1]
The XPath language is based on a tree representation of the XML document, and provides the ability to navigate around the tree, selecting nodes by a variety of criteria.[2][3]^ In popular use (though not in the official specification), an XPath expression is often referred to simply as "an XPath".
Originally motivated by a desire to provide a common syntax and behavior model between XPointer and XSLT, subsets of the XPath query language are used in other W3C specifications such as XML Schema, XForms and the Internationalization Tag Set (ITS).
XPath has been adopted by a number of XML processing libraries and tools, many of which also offer CSS Selectors, another W3C standard, as a simpler alternative to XPath.
XQuery is a language for finding and extracting elements and attributes from XML documents.
Here is an example of what XQuery could solve:
"Select all CD records with a price less than $10 from the CD collection stored in cd_catalog.xml"
XQuery 1.0 and XPath 2.0 share the same data model and support the same functions and operators. If you have already studied XPath you will have no problems with understanding XQuery.
XQuery can be used to:
Benefits
@prefix rdf: . #URI from W3.org @prefix rdfs: . #URI from W3.org @prefix mod: . @prefix obu: . obu:Module rdf:type rdf:Class. #Define RDF class
#OBU modules mod:U08027 a obu:Module ; obu:module-name "CURRENT RESEARCH";
obu:lecturer "Teo Kim Heng"; obu:Module_Status "Single"; obu:Pre_requisites "NO"; obu:Semester_it_runs_in "3"; obu:Level "4"; obu:Type "Compulsory".
mod:U08025 a obu:Module ; obu:module-name "FOUNDATIONS OF COMPUTATION"; obu:lecturer "Teo Kim Heng"; obu:Module_Status "Single"; obu:Pre_requisites "NO"; obu:Semester_it_runs_in "2"; obu:Level "4"; obu:Type "Compulsory".