php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #24993 Suggestion for DOM - creating XML documents with structure from a recordset
Submitted: 2003-08-08 21:06 UTC Modified: 2004-08-27 10:24 UTC
From: kris_beyers at hotmail dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.2 OS: WindowsXP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-08-08 21:06 UTC] kris_beyers at hotmail dot com
Description:
------------
Hi All,
 
It's not really a bug, but suggestion.. couldn't find a post address for that :oS

I just came up a nice suggestion for the XML DOM..
Now we still program with loops to give the rows, comming from the database-table, to DOM.  Whereupon DOM creates an XML document.. like this example http://forums.devshed.com/archive/5/2003/02/3/52511
 
I was wondering if we could DOM do the transformation from a recordset directly to XML data, using a DTD (or XSD) file for the structure. DOM itself would look for the column names(or even synonyms of column names) in the recordset itself and match them with the names found in the DTD (or XSD) file, an error will occur if one name is not found.
When there are multiple rows, DOM will loop to process each row. The validation of data types should still occur only during design time. This way the loops in the serverscript are gone :o) I know Microsoft has something like that, but they don't use DTD (or XSD) or other to build a structure..
Hope you like the idea.
 
With kind regards
Kris Beyers



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-27 10:24 UTC] chregu@php.net
This can easily be implemented in PHP code and will not go into the extension at all

Or look at XML_sql2xml in pear, it does something like that. Although not based on a DTD
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 18:01:31 2024 UTC