Teen Programmers Unite  
 

 

Return to forum top

Is XML the answer to my problems?

Posted by Haywood [send private reply] at February 19, 2002, 08:47:09 AM

I have a domain name... and I want to make a site where people can go and read articles that are on that site... I want to simply post the articles in some format (that's the question), and let people have the abiblity to search from any angle (author, subject, most recent)

I've looked into XML, and it looks like a good option, but I don't think I can put that up on, say Earthlink's servers. It seems like I'd have to work my own server.

Am I totally misguided here? Does anyone know of a good direction for me to head in? Do I need a database?

I need something that can easily be put up onto a host's servers... and I don't know where to start!

Thanks for any help you can offer.

Posted by taubz [send private reply] at February 19, 2002, 09:39:32 AM

Well... XML is a file format which forces you to be organized, and lets it be extensible. Personally, I think it just adds unnecessary overhead, since the file needs to be parsed first. Reading in XML files is easy from (AFAIK) Java, but then you'd need JSP. And there's probably a Perl module to do it too - if there is, you could just do it with CGI.

What I have always found easiest (since I use Perl) is to just make my own file format. On the first line I'd put the author, on the second line the subject, then the post date... etc, and after that the body of the article. Then to read it back is trival.

Databases are another option... Probably won't make any difference if you have fewer than 100 articles on a low traffic site anyway.

- taubz

Posted by Haywood [send private reply] at February 19, 2002, 10:09:16 AM

Thanks for your help... I've worked with Perl and CGI before... so I won't be too lost. I'm assuming that what I need is fairly common, and that if I do get lost, I can just go to a Perl resource site and catch on where I left off?

What I'm doing is pretty simple... correct?

I just want to make sure I'm not in over my head.

Thanks again.

Posted by metamorphic [send private reply] at February 19, 2002, 12:52:32 PM

if what you want is to allow articles to be posted, look into a CMS such as slashdot, postnuke or phpnuke and edit there code to suit your needs. Slashdot would be the best bet as its written in perl, the other 2 are in php.

Marc

PS XML is more of a standard for accessing and organising data. My opinion - useless, stay away, personally i would say use a DB as they tend to be much more organised

Posted by metamorphic [send private reply] at February 19, 2002, 12:54:18 PM

Tuubz.. Im pretty sure there is a php module to allow XML parsing. I think it even comes built into the windows distro

Marc

Posted by gian [send private reply] at February 19, 2002, 10:53:15 PM

Yeah, go DB.... XML gets messy quickly...

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.