Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Image

CHAPTER

8

XML Query

Oracle XML DB 11g XQuery supports the W3C XML Query (XQuery) 1.0 standard (http://www.w3.org/TR/xquery/). In Oracle Database 11gR2, XQuery is supported mainly by two SQL/XML functions, XMLQuery() and XMLTable(). The XMLQuery() function takes an XQuery expression as the input to query XML. The XMLTable() function maps the result of an XQuery evaluation into relational rows and columns.

In Oracle Database 11gR2, XQuery functions are replacing Oracle SQL functions and becoming the standard to query XML in the Oracle database. The XMLQuery() and XMLTable() functions replace the SQL functions extract() and XMLSequence() respectively. In addition, XMLCast() is used with the XMLQuery() function to replace extractValues() to get the result as an XMLType or a scalar value. XMLExists() replaces existsNode() to evaluate XQuery as a predicate in the SQL where clause.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint