XML instead of mySQL
Moderator: General Moderators
-
Little Spy
- Forum Commoner
- Posts: 31
- Joined: Thu Oct 10, 2002 8:18 pm
- Contact:
XML instead of mySQL
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.
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.
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: