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
August 20, 2007 @ 12:48:00

PHPBuilder.com has a new tutorial posted today with a look at the easy creation of dynamic XML with the data from a database.

In this article I will show how to generate dynamic XML documents with Object-Oriented PHP. Before I get started, let's get right to the heart of this functionality. Although the code may look fancy, being packaged up inside objects and inheritance, the key elements of this functionality rest in the the mysql_list_fields() and mysql_num_fields() functions.

The XML is built manually with the tags assigned to a string as they are built. The information is from a simple query to select all from a user-defined table and is output with a UTF-8 character encoding. They also include a Javascript (download) that helps in making an XMLHttpRequest connection to fetch the XML you've created and pull it in.

0 comments voice your opinion now!
dynamic xml create database xmlhttprequest ajax tutorial dynamic xml create database xmlhttprequest ajax tutorial


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: AJAX Chat Part Tutorial 6 : Updating the User List

PHPBuilder.com: PHP and Adobe Air: Building a Time-tracking and Billing Application - Part II

Matthew Weier O'Phinney's Blog: Creating Re-Usable Zend_Application Resource Plugins

Dave Marshall: Silex Controllers as Services

Ralph Schindler's Blog: Compiling Gearman (or anything) for Zend Server CE on Snow Leopard


Community Events





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


developer interview symfony podcast laravel configure install library community list series code api application release unittest introduction language threedevsandamaybe wordpress

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