Database creating from XML file
| From: | Bernardo de Barros Franco | Date: | Tue, 05 Nov 2002 20:44:15 +0000 |
| Subject: | Database creating from XML file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-122860@lists.php.net to get a copy of this message | ||
Hello PHP users,
I've recently tried to find info about creating databases from XML files and
didn't find anything. Since there is no php.XML I'm posting it in the
general section.
Does anyone know where I can find PHP source code that will parse an XML
file and generate SQL queries that would create tables based on the
structure described on the XML?
Something like:
xml = "
<Database name='db1'>
<Table name='Table1'>
<Attribute name='foo1' type='int4' />
</Table>
</Database>
";
and some function func(xml) would return a set of SQL queries that would
create that database in a particular DB (say PostgreSQL or MySQL).
Anything similar would help already.
Thanks in advance,
Bernardo de Barros Franco