You are here: Re: xml to sql? « All PHP « IT news, forums, messages
Re: xml to sql?

Posted by NC on 10/13/07 11:36

Jeff D. Hamann wrote:
>
> I've been trying to find a script that can generate an empty (or full)
> database, using sql create statements, from an xml file using php.

Generally speaking, this is something you should avoid. Imagine a
piece of XML that looks like this:

<item>
<species>Cat</species>
<breed>Siamese</breed>
<name>Fluffy</name>
</item>

<item>
<brand>Whiskas</brand>
<description>Cat food</description>
<weight unit="lbs">10</weight>
<package>Bag</package>
</item>

Note that there are two <item> entities, but they contain completely
different data fields. Moreover, XML can contain entities within
entities, whereas databases cannot contain records within records...

This problem can be solved only if the XML structure can be directly
mapped onto a database...

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация