News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Dynamic XML with PHP
January 18, 2007 @ 16:54:00

PHPBuilder.com as posted a new tutorial that deals with combining the power of PHP and the flexibility of XML to create a simple, easy-to-use class for creating dynamic XML documents.

In this article I will show how to generate dynamic XML documents with Object-Oriented PHP. [...] So, in simplicity, instead of outputting our XML by handcoded column names, we are going to create a method that dynamically creates XML output with only a record id and the table name to query from. The implementation, however, is a bit more complex.

They start at the end (to know where they're headed) and work backwards to create functions to output the XML, get the items from the database, and set the values to the XML. The end result is a simple XML output that, based on field names from the database, organizes the database output.

2 comments voice your opinion now!
dynamic xml class tutorial output database interface dynamic xml class tutorial output database interface


blog comments powered by Disqus

Similar Posts

JSLabs Blog: How to turn a php script to an exe...for free

Jani Hartikainen's Blog: Creating a simple abstract model to reduce boilerplate code

Raphael Stolt's Blog: Scraping websites with Zend_Dom_Query

Russell Walker: Public properties, getters and setters, or magic?

IBM developerWorks: Understanding the Zend Framework, Part 1: The basics


Community Events





Don't see your event here?
Let us know!


podcast testing opinion release experience symfony2 language threedevsandamaybe list install developer configure series unittest interview laravel introduction framework community code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework