List of Listings


Chapter 1: Introducing PHP and XML

Listing 1-1: Maximum of Three Numbers
Listing 1-2: Using the switch case Conditional Statement
Listing 1-3: Using the while Loop
Listing 1-4: Using the for Loop
Listing 1-5: User-Defined Function in PHP
Listing 1-6: Using Nested PHP Functions
Listing 1-7: Generating Errors Using the trigger_error() Function
Listing 1-8: Using Custom Error Handler
Listing 1-9: Using PHP Classes and Objects
Listing 1-10: Creating Constructors with Classes
Listing 1-11: File Handling Functions
Listing 1-12: Structure of an XML Document
Listing 1-13: Internal DTD
Listing 1-14: The External DTD MyDTD.dtd
Listing 1-15: Referencing an External DTD
Listing 1-16: Assigning Prefix
Listing 1-17: Namespaces in XML
Listing 1-18: Using Internal XML Schema

Chapter 2: PHP and Simple Application Programming Interface for XML

Listing 2-1: Using the Root Element of an XML Document
Listing 2-2: Creating Well-Formed XML Document
Listing 2-3: Parsing the XML Document
Listing 2-4: Handling the Opening Tag Event
Listing 2-5: Implementing the SAX Parser
Listing 2-6: Implementing the AbstractFilter Class
Listing 2-7: Adding Data in XML Document Using SAX
Listing 2-8: Contents of the XML Document
Listing 2-9: Removing Data in XML Document Using SAX
Listing 2-10: Querying an XML Document Using SAX
Listing 2-11: Generating XML Data from a Text File
Listing 2-12: Content of the XML File
Listing 2-13: Creating PHP Objects from XML Document

Chapter 3: PHP and Document Object Model

Listing 3-1: Creating an XML Document
Listing 3-2: Properties of an XML File
Listing 3-3: Structure of the DomDocument Class
Listing 3-4: Parsing the XML string
Listing 3-5: Parsing XML File
Listing 3-6: Structure of the DomNode Class
Listing 3-7: Creating an XML File
Listing 3-8: Structuring an XML Document
Listing 3-9: Using the DomText Object
Listing 3-10: Structure of the DomAttribute Class
Listing 3-11: Using the DomAttribute Class
Listing 3-12: Creating the bookcart.xml File
Listing 3-13: Adding Book to the Shopping Cart
Listing 3-14: Removing Tree Elements
Listing 3-15: Creating the book.xml File
Listing 3-16: Querying the XML Document using DOM
Listing 3-17: Creating XML File using DOM

Chapter 4: Understanding Extensible Stylesheet Language for Transformation

Listing 4-1: Using the for-each Element
Listing 4-2: Using the sort Element
Listing 4-3: Using the syntax Element
Listing 4-4: Implementing Template Rule
Listing 4-5: Creating Template Rules
Listing 4-6: Using the XSLT Expressions and Functions
Listing 4-7: Implementing the Expressions and Functions on XML Document
Listing 4-8: Assigning the Value to a Parameter

Chapter 5: PHP and XPath

Listing 5-1: The customer.xml Document
Listing 5-2: The customer.xml Document with Different Nodes
Listing 5-3: The sample XML Document
Listing 5-4: The companydetails.xml Document
Listing 5-5: The course.xml Document
Listing 5-6: The books.xml Document
Listing 5-7: Executing the XPath Query Using DOM Implementation in PHP
Listing 5-8: The employees .xml Document
Listing 5-9: Retrieving Employee Names
Listing 5-10: The chapter.xml Document
Listing 5-11: The chapter.xsl Stylesheet File
Listing 5-12: Output After Applying the Stylesheet

Chapter 6: PHP and XML-Remote Procedure Calls

Listing 6-1: XML-RPC Client Request
Listing 6-2: XML-RPC Server Response to a Successful Client Request
Listing 6-3: XML-RPC Server Response to an Unsuccessful Client Request
Listing 6-4: XML-RPC Client Request in PHP
Listing 6-5: XML-RPC Client Request that Invokes the examples.multiply() Method
Listing 6-6: The Client Request to Add Three Floating-point Numbers
Listing 6-7: PHP Server Script to Multiply Two Integers
Listing 6-8: PHP Server Script to Sort Employees
Listing 6-9: PHP Server Script to Add Double Values

Chapter 7: PHP and Web Distributed Data Exchange

Listing 7-1: Serializing a Variable Using the wddx_serialize_value() Function
Listing 7-2: Adding a Comment to a the WDDX Packet
Listing 7-3: Serializing an Array Using the wddx_serialize_value() Function
Listing 7-4: Serializing a Variable Using the wddx_serialize_vars() Function
Listing 7-5: Serializing Multiple Values Using the wddx_serialize_vars() Function
Listing 7-6: Using the wddx_serialize_vars() Function
Listing 7-7: Creating a WDDX Packet Using the wddx_add_vars() Function
Listing 7-8: Using the wddx_add_vars() Function to Add More than One Variable
Listing 7-9: Deserializing a Single PHP Variable
Listing 7-10: Deserializing an Array of Values

Chapter 8: Working with Databases using PHP and XML

Listing 8-1: Creating a Connection to the Database
Listing 8-2: Creating the Employee table in MySQL
Listing 8-3: Inserting Rows in the Employee Table
Listing 8-4: Creating the XML Document
Listing 8-5: Exporting Data Retrieved from Multiple Tables
Listing 8-6: Closing Connection to MySQL Database
Listing 8-7: Generating XML and Converting into HTML
Listing 8-8: Content of the student.xml File
Listing 8-9: Creating the Student Table
Listing 8-10: Parsing the student.xml File using SAX
Listing 8-11: Parsing XML Document using DOM
Listing 8-12: Contents of datastudent.xml File
Listing 8-13: Importing the XML Document

Chapter 9: Creating an Online Shopping Cart Application

Listing 9-1: Creating Database Tables
Listing 9-2: The index.php File
Listing 9-3: Verifying the User Name and Password Information
Listing 9-4: Creating the Top Section
Listing 9-5: Creating the Right Section of the Home Page
Listing 9-6: The logout.php File for the Administrator
Listing 9-7: Creating a Web Page to Add a New Category
Listing 9-8: Adding a New Category to the Database
Listing 9-9: The add_book.php File
Listing 9-10: The add_book1.php File
Listing 9-11: The create_xml.php File
Listing 9-12: The list_cat.php File
Listing 9-13: The edit_cat.php File
Listing 9-14: The edit_cat1.php File
Listing 9-15: The del_cat.php File
Listing 9-16: The del_cat1.php File
Listing 9-17: The view_book.php File
Listing 9-18: The edit_book.php File
Listing 9-19: The edit_book1.php File
Listing 9-20: The del_book.php File
Listing 9-21: The del_book1.php File
Listing 9-22: The tophtml.php File
Listing 9-23: Creating the Middle Section of the Home Page
Listing 9-24: The bottomhtml.php File
Listing 9-25: The new.php File
Listing 9-26: The new1.php File
Listing 9-27: Displaying Books in a Specified Category
Listing 9-28: The add_cart.php File
Listing 9-29: Retrieving Books matching a Specified Title
Listing 9-30: The checkout.php File
Listing 9-31: The del_cart.php File
Listing 9-32: The final_order.php File
Listing 9-33: The logout.php File for the End User

Appendix B: Introducing eZXML

Listing B-1: Creating the employee.xml File
Listing B-2: Creating Object Representation of the employee.xml File
Listing B-3: Creating the customer.xml File
Listing B-4: Converting customer.xml into HTML Format

Appendix E: Implementing SOAP using SOAPx4

Listing E-1: Creating a SOAP Request
Listing E-2: The Generated SOAP Packet
Listing E-3: Creating a SOAP Response
Listing E-4: The Generated SOAP Response
Listing E-5: Creating a SOAP Server
Listing E-6: Creating a SOAP Client

Appendix G: PHP and Extensible Stylesheet Language for Transformation

Listing G-1: Using the xslt_process() Function



Integrating PHP and XML 2004
Integrating PHP and XML 2004
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 51

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net