Another idea of doing this task is using XSLT.  XML file can be tranformed
to a text SQL file, then it can be called by PHP scripts.  That can't be
hard to do that if you know XSLT.

"Bernardo De Barros Franco" <[EMAIL PROTECTED]> wrote in message
news:20021105203656.93604.qmail@;pb1.pair.com...
> 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
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to