This book is available for purchase at packtpub.com PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax
Read PHP Oracle Web Development Book Review
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 books. The author is also an expert in open source technologies and SOA (Service Oriented Architecture). But besides all these, the author is primarily known for his works on Oracle as he is backed by more than 10 years of experience in working with Oracle environment.
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 books. PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting book for any web development professionals...
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. In the following sections you will learn how to construct XML from...
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. geshibot language PHP geshibot To figure...
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 DOMXPath object as parameters. NOTE While the example...
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 same general results. However before you can use the...
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 follows Benefiting from the XML-specific memory...
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.employees table and the PHP script then transforms that...
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.employees. The following listing contains the source...
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 to perform SQL operations on XML data as well as XML...
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 on XMLType instances. The most commonly used methods...
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 information provided by the schema. NOTE An XML schema can...
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 the following query from SQL Plus when connected as...
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. Turning back to the SELECT statement used in the SQLXMLQuery.php...
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 in practice is that the empSch_v view can be inherently...
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. NOTE Oracle XML DB repository also known as XML repository is a hierarchically organized repository seamlessly integrated with Oracle Database...
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 through which you can access repository resources.For...
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 of the above protocols say FTP. NOTE Starting...
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 of data that can be expressed in XML. The following...
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 relational data rather than XML but the data which you...