Working with XQuery - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Working with XQuery

Description:

Creating a resource. Execute the following PL/SQL block: Declare. ret boolean; begin ... Create a folder in Oracle XML repository (use PL/SQL code from 3) ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 8
Provided by: atkin2
Category:
Tags: create | working | xquery

less

Transcript and Presenter's Notes

Title: Working with XQuery


1
Working with XQuery
2
Creating XML Resources in XML Repository
  • XML files are stored within the database as files
    in a file system
  • Create a folder in Oracle XML repository
  • Create a resource in the repository
  • Delete resource from the repository

3
Creating a Folder
  • declare
  • ret boolean
  • begin
  • ret dbms_xdb.createfolder('/public/folder_name
    ')
  • commit
  • end
  • /

4
Creating a resource
  • Execute the following PL/SQL block
  • Declare
  • ret boolean
  • begin
  • ret dbms_xdb.createresource('/public/folder
    _name/file_name.xml',

5
PL/SQL block (cont)
  • 'ltroot_elementgt
  • lt/root_elementgt
  • ')
  • commit
  • end
  • /

6
Deleting Resources from XML Repository
  • The following procedure call can be used
  • call dbms_xdb.deleteresource('/public/folder_nam
    e/file_name.xml')
  • To complete a deletion
  • commit

7
Simple Exercise
  • Create a folder in Oracle XML repository (use
    PL/SQL code from slide 3)
  • Create ( or upload) an XML file in your SIT
    account
  • Create a resource in Oracle XML repository (use
    PL/SQL code from slides 4-5)
  • Formulate queries using XQuery language
Write a Comment
User Comments (0)
About PowerShow.com