If you have an XML document such as that in Example 4-4, then you can use: SELECT extract(OBJECT_VALUE, '/Purchase Order/Reference') "REFERENCE" FROM purchaseorder WHERE exists Node(OBJECT_VALUE, '/Purchase Order[Special Instructions="Expedite"]') = 1; REFERENCE ------------------------------------------------------------ argument is an XML value.
This tutorial shows you how to use PHP with Oracle Database 11g.
Approximately 2 hours PHP is a popular web scripting language, and is often used to create database-driven web sites.
The format and data of XML purchase orders are well suited for Oracle XML DB storage and processing techniques because purchase orders are highly structured XML documents.
However, the majority of techniques introduced here can also be used to manage other types of XML documents, such as those containing unstructured or semi-structured data.
If multiple text nodes are referenced in the XPath expression, the text nodes are collapsed into a single text node value.
You can use XPath position predicates (sometimes called indexes) to identify individual elements in case of repeated elements in an XML document.
This chapter provides an overview of how to use Oracle XML DB.
The examples here illustrate techniques for accessing and managing XML content in purchase orders.
This chapter also further explains Oracle XML DB concepts introduced in Chapter 1, "Introduction to Oracle XML DB".
This chapter contains these topics: , SQL developers can leverage the power of the relational database while working in the context of XML.
Before starting this Oracle By Example, please have the following prerequisites completed: create sequence emp_id_seq start with 400; create trigger my_emp_id_trigger before insert on employees for each row begin select emp_id_seq.nextval into :new.employee_id from dual; end; / -- -- Also to simplify the example we remove this trigger otherwise -- records can only be updated once without violating the -- PYTHONHOL.