Code Listing 6: Retrieving XML documents by using XDBUriType

SQL> SELECT XDBUriType(any_path).getXML()

  2  FROM resource_view
  3  WHERE under_path(res,'/CD')=1
  4  AND extractValue(res,'/Resource/ContentType')='text/xml';

XDBURITYPE(ANY_PATH).GETXML()                                                   

------------------------------------
<CD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cd.xsd">                                                               
  <Title>Legends of the Great Lakes</Title>                                     
  <Artist>Carl Behrend</Artist>                                                 
  <Website>http://greatlakeslegends.com</Website>
  ...



SQL> SELECT XDBUriType(any_path || '#/CD/Title/text()').getXML() title
  2  FROM resource_view
  3  WHERE under_path(res,'/CD')=1
  4  AND extractValue(res,'/Resource/ContentType')='text/xml';


------------------------------------ 
Nothing Less
Legends of the Great Lakes

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy