RE: [PHP] SQL in XML [was PHP and DBase...]
| From: | David BERCOT | Date: | Wed, 01 Feb 2006 19:58:31 +0000 |
| Subject: | RE: [PHP] SQL in XML [was PHP and DBase...] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229665@lists.php.net to get a copy of this message | ||
> > But, finally, I wonder if I shouldn't use XML files instead ?
> > Is it possible, directly, to make a SQL request on a XML file ?
>
> How much data are you storing and how fast do you need it?
>
> If you're doing heavy "database" type queries, then just use mySQL.
Yes, I use Oracle for my "real" data ;-)
> XML is kind of a PITA to use IMHO. You have to set up DOM Objects and all
> this crap, then loop over nodes and use xpaths and watch out for #text
> elements and it's just messy. I'm forced to use XML for part of a project @
> work, and I'm always grateful when I can switch back to using a database and
> SQL as God intended it to be. ;-p
Hum, ok. XPaths is the only good solution to query an XML file (I am a
newbie in this domain) ?
> However, if you're just storing some basic configs or preferences, then I
> would suggest looking into a much simpler (and universal):
>
> http://www.php.net/parse_ini_file
Yes !!! Excellent !!! It is exactly what I need.
I'd like to play with XML files, but, for my problem, your solution is
perfect !
Thank you very much.
David.