note 54977 rejected from ref.simplexml by betz

From: Date: Fri, 22 Jul 2005 10:48:47 +0000
Subject: note 54977 rejected from ref.simplexml by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92289@lists.php.net to get a copy of this message
Note Submitter: scottprive at t gee mail dot com ---- Is it me, or do most of the XML tutorials for PHP assume you are <em>parsing</em> XML? What about generating XML from scratch? It seems like this should be common in PHP, especially since current MySQL does not return native XML query results (unless you shell out, and that's not an option). It seems the focus of SimpleXML documentation (and web tutorials) deal with PHP as a consumer of XML... not a producer. The context here is I am transitioning to PHP from Perl, and wish to generate well formed XML from MySQL tables. I'm capable of iterating over the MySQL data myself and generate the XML, but this seems like reinventing the wheel. I am stubborn and I want to do this without hand-building a template using plain text. Now, I have found few PHP5 tutorials for <em>adding nodes</em> to an existing XML file (or string), but again that's 'cheating' (shortcut) since the root node was not constructed with SimpleXML function(s).

« previous php.notes (#92289) next »