Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - 'XML-database' driven website? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Modereb

Paragoomba
Level: 15

Posts: 44/75
EXP: 14749
For next: 1635

Since: 06-04-04

Since last post: 350 days
Last activity: 339 days
Posted on 09-23-04 04:17 PM Link | Quote
I've been working with PHP and (My)SQL for years now, and I can put together pretty much any type of PHP website with a SQL database 'fuelling' the content. I've been trying out XML for a while now as well. Though I still prefer working with a server side language, the major disadvantage is that you don't always have the opportunity to use it. After all, you do need support for it and you need a database.

The thing I like about XML is that I can use it anywhere, and of course because of the fact that it's more 'universal', though I'm not quite aware of its full potential yet.

As for my question...

Let's say I have a website where I can post news articles. I'd easily put it together with PHP and MySQL, and the database structure would look like this:

News_IDPoster_IDSubjectContent
1ModerebAbout PiePie is good! :-D
2ModerebMonstersMonsters are scary :-(
3ModerebRandomI feel like an idiot :*)


I'd have an index page listing all the subjects of the news records found in the database, and when you'd click one, you'd be redirected to, for example, readnews.php?News_ID=xxxx would be the News_ID number of the concerning article, and the content of it is displayed.

Now, for the question.

Is this possible with XML? Let's say I have an XML file with the following content:

<?xml version="1.0" encoding="ISO-8859-1"?>

<news>
<article>
<News_ID>1</News_ID>
<Poster_ID>Modered</Poster_ID>
<Subject>About Pie</Subject>
<Content>Pie is good! :-D</Content>
</article>
<article>
<News_ID>2</News_ID>
<Poster_ID>Modered</Poster_ID>
<Subject>Monsters</Subject>
<Content>Monsters are scary :-(</Content>
</article>
<article>
<News_ID>3</News_ID>
<Poster_ID>Modered</Poster_ID>
<Subject>Random</Subject>
<Content>I feel like an idiot :*)</Content>
</article>
</news>


I already know how to make a page listing all the news records' Subject, using XSL. However, I do not know if it's possible with XML to create something as I did with PHP/MySQL above. Going to an address such as readnews.xml?News_ID=xx where the content of News_ID xx (where xx is, once again, the News_ID number of the concerning news message).

So, is this possible? If so, how? Thanks in advance!


(edited by Modereb on 09-23-04 07:18 AM)
Cellar Dweller

Flurry
!!!
Level: 27

Posts: 148/269
EXP: 107817
For next: 8342

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 09-25-04 11:01 AM Link | Quote
Yes it is possible, and I's sure that there are libraries to help. The problem is that as the data files get bigger, the site slows down. MySQL or similar database systems will slow down too as the dataset gets bigger, but the slowdown will be much less.
sloat

Level: 16

Posts: 3/85
EXP: 18044
For next: 2212

Since: 05-21-04
From: South Central Delaware

Since last post: 19 days
Last activity: 5 hours
Posted on 09-27-04 11:59 PM Link | Quote
it'd be horrible to deal with group access though. think ms access horrible.
dunno if you planned on taking it that far, but...

i'd stick with mysql or some other rdbms. xml is better suited for things that need extreme verbosity.
Modereb

Paragoomba
Level: 15

Posts: 52/75
EXP: 14749
For next: 1635

Since: 06-04-04

Since last post: 350 days
Last activity: 339 days
Posted on 09-28-04 02:32 AM Link | Quote
I prefer PHP and MySQL for sollutions like this as well, but like I said, I don't always have the opportunity to use those.

Also, I'm aware of the slowdown, though it won't matter for something like this; adding a short article about once in 2 weeks. It won't be a stuffed 'database' at all.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - 'XML-database' driven website? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.013 seconds.