The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 4 of 4

Thread: use XML or not?

  1. #1
    Registered User

    use XML or not?

    I have in ASP script that generates a press release archive, which links to the full press release content on the web. Archive's information is all saved in an XML file.

    Later, I want to develop a script that will let anyone,through a web form, to add press releases, rather than me constantly having to code each press release.

    I know it's possible to write to XML files externally, but I would like to get people's opinion who has more experience with web development, if my approach to creating this entire archive is okay, or should I use an actual database to handle this kind of work.

    I'm a designer, which is why my knowledge of web development is limited.

  2. #2

  3. #3
    Registered User
    Quote Originally Posted by bwh2 View Post
    a DB is the better option in my opinion. but XML would still work.
    may ask what makes a DB better, in your opinion?

  4. #4
    a DB's structure is more flexible going forward. in short...

    data is more accessible in a DB because querying a database is easier (and faster) than parsing an XML file. let's say you want to know how many press releases user X has added. with a DB, that's one query and would take 2 seconds. but with XML, you need to parse it and then hard code your counter in a separate language. querying a DB is just faster and easier, making the data more accessible.

    DB's are also more flexible in terms of adding or removing content. in a DB, you could just insert a column and/or separate tables. with an XML file, you would need to rewrite the entire file to account for the newly added tag.

    DB's make your audit trail easier as well. so if your users have the ability to add their own press releases, you would want to record things like who added it, when, etc. but you don't necessarily want or need that information publicly available. with a DB, that's easy because you just don't output those columns/table data. with XML, that can be more tricky because the file is sitting out in the public domain. so you would have to write separate XML files to contain that data. then things get messy.

    DB's are also better about managing permissions. so with a DB, it's easier to decide who can do what - like who can add a press release, who can edit one, who can delete one, etc. with XML, you would need to hard code that into the web app (PHP, ASP, whatever) or a separate XML file. of course, then you also have to manage who has permission to access the permissions XML file. DB's are a cleaner solution.

    also, with a DB, it's easier to account for some user input error. but if an XML file doesn't parse correctly or follow the schema, you've got problems.

    like i said, XML will work but in my opinion a DB would be better.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012