XML instead of mySQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Little Spy
Forum Commoner
Posts: 31
Joined: Thu Oct 10, 2002 8:18 pm
Contact:

XML instead of mySQL

Post 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.
DeGauss
Forum Contributor
Posts: 105
Joined: Tue Oct 22, 2002 9:44 am
Location: Gainesville, FL

Post 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.
Little Spy
Forum Commoner
Posts: 31
Joined: Thu Oct 10, 2002 8:18 pm
Contact:

Post 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?
Post Reply