alt
Advertisement
Sponsored links
Learn Oracle
Online Training
Career Series
Exforsys
Sponsored Links
Exforsys arrow PHP Oracle


PHP Oracle
Start Here
PHP Oracle Web Development Data processing, Security, Caching, XML, Web Services, and Ajax The book is written by Yuli Vaseliev, a well known author of different web development and programming book...

Tutorial Index
  1. Processing XML in PHP/Oracle Applications As mentioned, there are two alternatives when it comes to performing XML processing in your PHP/Oracle application. You can perform any required XML processing using either PHP's XML extensions (or PEAR XML packages) or Oracle's XML features.
  1. Creating XML with the DOM PHP Extension In fact, the PHP DOM extension is a set of classes that can be used to generate, access, and manipulate XML data. The DOM.php script defined in the following listing shows how to generate an XML document based on the result set retrieved from the database.
  1. Querying a DOM Document with XPath One way to access the DOM tree in a DOMDocument object is through an associated DOMXPath object. Identifying a specifi c node or nodes within the DOM tree of a DOMDocument object with this approach involves use of appropriate XPath expressions passed to the DOMXPa...
  1. Transforming and Processing XML with XSLT In the preceding example, you transform XML into HTML directly in your script, wrapping the data extracted from the XML document into appropriate HTML tags. Alternatively, you might perform an XSL (Extensible Stylesheet Language) transformation to get the s...
  1. Performing XML Processing inside the Database When building XML-enabled applications on top of Oracle, there are many advantages to performing the XML processing inside the database when compared to performing it on the client. The key advantages to perform XML processing inside the database are as...
  1. Moving All the XML Processing into the Database In the preceding example, the database server performs only a part of the XML processing while the rest is still performed by the PHP engine. Specifically, the database server generates an employees XML document based on the records from the hr.employ...
  1. Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr.employees table, you can create a script that will instruct the database to build an HTML page based on the data stored in hr...
  1. Using Oracle Database for Storing, Modifying, and Retrieving XML Data With Oracle XML DB, you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability. One of the most interesting things about Oracle XML DB is that it allows you t...
  1. Using XMLType for Handling XML Data in the Database Being an object type, XMLType can not only be used to store XML data in the database but also to operate on that data via its built-in methods. Regardless of the storage model you choose, XMLType provides a set of XML-specific methods to operate ...
  1. Using XML Schemas The simplest way to create an XMLType storage structure in Oracle XML DB is by registering an appropriate XML schema against the database. As a part of the registration process, Oracle automatically creates the storage for a particular set of XML documents, based on the informatio...
  1. Retrieving XML DataTo retrieve XML data from an XMLType table, you can use a SELECT SQL statement, just as you would if you had to query a relational table. For example, to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section, you might issue...
  1. Using XMLType Views Using XMLType Views XMLType views provide a convenient way to construct XML representations of relational data without physically migrating that data into XML. Once written, an XMLType view may be used in various queries, making them simpler and so increasing their readability.
  1. Performing DML Operations on XML Schema-Based XMLType Views Analyzing the underlying query of the empSch_v view discussed in the preceding section, you may note that each attribute of the EMP_T object used in the select list maps to a certain column of a single table, namely emps. What this means i...
  1. Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository, which is an essential component of Oracle XML DB.
  1. Accessing Repository Resources with SQL In fact, Oracle XML DB repository resources are stored in a set of database tables and indexes, which can be accessed via SQL. You are not supposed to access those tables directly. Instead, Oracle XML DB provides two public views RESOURCE_VIEW and PATH_VIEW t...
  1. Taking Advantage of Standard Internet Protocols As mentioned, Oracle XML DB provides native support for standard internet protocols, such as HTTP(S), WebDAV, and FTP. Continuing with the preceding sample, you might, for example, upload another employee XML document into the XML repository with one ...
  1. Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2, you can take advantage of a full-featured native XQuery engine integrated with the database. With Oracle XQuery, you can accomplish various tasks involved in developing PHP/Oracle XML applications, operating on any kind o...
  1. Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data, the example in this section illustrates how you can shred XML data back into relational data. This reverse operation can be useful if your application works with relat...

 

 
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape