Page 1 of 1

XML instead of mySQL

Posted: Sun Apr 06, 2003 10:06 pm
by Little Spy
I have a script I am creating to manage news. I will be publicly releasing this and I want to give users the ability to choose mysql for datastorage. I have heard about people using XML in the same way as an SQL database for things like validating users' passwords and anything else that would be in an SQL database. Is this possible or would a normal flat file system with regular expressions, and file functions be better? Any insight is welcome.

Posted: Mon Apr 07, 2003 9:24 am
by DeGauss
You could use flat files no problem (YaBB does it for it's "database" structure).

using XML would be a different kettle of fish... I'm not big on using XML with PHP unless there's a specific reason to do it (and it looks like you got one... Trying to do stuff with RSS feeds, right?).

I'm not hot on how PHP interacts with XML, but you'd have a normal XML file with

<something>
<item>
<title>Blah</title>
<desc>Something</desc>
</item>
</something>

Or similar, you'd then want to parse that XML file with some XSL (which i think you can do with PHP). Most XSL looks like normal HTML but with for:each stuff in there to go through the XML stuff.

You should take a look at http://www.w3schools.net and look at their XML stuff.

Posted: Mon Apr 07, 2003 1:19 pm
by Little Spy
thank you very much but before I try to dive into this on my own has anyone used XML like I am trying to use it?