•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 455,972 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,808 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 4617 | Replies: 32
![]() |
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 2
Solved Threads: 0
XQuery is a new query language designed specifically to work with XML data. Xquery is a part of the W3C industry standard. It lets users navigate through the hierarchical structure inherent in XML documents. As a result, you can retrieve XML documents or document fragments using XQuery. You can also write XQuery that include XML-based predicates to "filter out" unwanted data from the results that DB2 will return.
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 2
Solved Threads: 0
Many SQL users mistakenly assume that XQuery is very similar to SQL. However,
XQuery differs from SQL in many ways largely because the languages were designed to work with different data models that have different characteristics. XML documents contain hierarchies and possess an inherent order. By contrast, tables supported by relational DBMSs (or, more precisely, SQL-based DBMSs) are flat and set-based, so rows are unordered.
XQuery differs from SQL in many ways largely because the languages were designed to work with different data models that have different characteristics. XML documents contain hierarchies and possess an inherent order. By contrast, tables supported by relational DBMSs (or, more precisely, SQL-based DBMSs) are flat and set-based, so rows are unordered.
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 2
Solved Threads: 0
Also, XQuery lacks null values because XML documents omit missing or unknown data. SQL uses nulls to represent missing or unknown data values. XQuery returns sequences of XML data; SQL returns result sets of various SQL data types.
XQuery operates only on XML data. SQL operates on columns defined on traditional
SQL types and SQL/XML (SQL with XML extensions) operates on both XML data and traditional types of SQL data.
XQuery operates only on XML data. SQL operates on columns defined on traditional
SQL types and SQL/XML (SQL with XML extensions) operates on both XML data and traditional types of SQL data.
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 2
Solved Threads: 0
XQuery supports XPath expressions that allow users to navigate through an XML document hierarchy to locate portions of interest. XPath expressions look very much like the expressions you use when working with a traditional computer file system. A path expression in XQuery consists of a series of "steps" separated by slash characters. In its simplest form, each step navigates downward in an XML hierarchy to find the children of the elements returned by the previous step. Each step in a path expression may also contain a predicate that filters the elements that are returned by that step, retaining only elements that satisfy some condition. You can check http://www.ibm.com/developerworks/db...m-0604saracco/ to learn basic XQuery expressions for querying DB2 XML data XQuery.
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 2
Solved Threads: 0
FLWOR Expression is much like a SELECT-FROM-WHERE expression in SQL. It is used to iterate through a sequence of items and to optionally return something that is computed from each item. XQuery FLWOR expression may contain multiple clauses denoted by keywords. The clauses of a FLWOR expression begin with the following keywords:
• for: Iterates through an input sequence, binding a variable to each input item in turn
• let: Declares a variable and assigns it a value, which may be a list containing multiple items
• where: Specifies criteria for filtering query results
• order by: Specifies the sort order of the result
• return: Defines the result to be returned
• for: Iterates through an input sequence, binding a variable to each input item in turn
• let: Declares a variable and assigns it a value, which may be a list containing multiple items
• where: Specifies criteria for filtering query results
• order by: Specifies the sort order of the result
• return: Defines the result to be returned
![]() |
•
•
•
•
•
•
•
•
DaniWeb XML, XSLT and XPATH Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- XML Management (RSS, Web Services and SOAP)
- Database Design : DB2 + PHP + Windows? (Database Design)
- Unable to uninstall DB2 Express-c (Win XP Home) (Windows NT / 2000 / XP / 2003)
- Complete guideline book for the DB2 (Shell Scripting)
- shell script manual for db2 (Shell Scripting)
- extracting db2 table records to csv (Shell Scripting)
- Simple question about using JDBC to access DB2 (Java)
- Immediate project for IBM DB2 UDB database administrator (Software Development Job Offers)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: Xpath
- Next Thread: SQL/XML Query


Linear Mode