SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Php & Xml

  1. #1
    SitePoint Zealot MediaOhgr's Avatar
    Join Date
    Jul 2001
    Location
    Calgary, Alberta, Canada
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Php & Xml

    I've been messin' about with PHP for the last few weeks and see that 90% of the free PHP scripts out there utilize MySQL. Personally, I do not want to mess with MySQL right now.

    What I'm wondering is, how well does PHP mix in with XML? I've got a decent handle on XML right now and would like to use it as a simple database replacement.

    I'm just looking to make a few simple starter scripts like a site news that holds maybe 10 small news articles for site updates and what have you. Simple stuff!

    Next question ... can one write to an XML document with PHP? The method I'm thinking of is an HTML form set up to run a PHP form handler that will write to the XML file saved on the server. Possible? Worth the work?
    MediaOhgr - But then again, maybe it's just me ...

  2. #2
    SitePoint Zealot Aonghus's Avatar
    Join Date
    Feb 2001
    Location
    Ireland
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm... XML isn't a database, or even a database replacement, and it shouldn't really be used as one. XML is what they call a 'data categorisation language', basically it says what type of data a piece of text is, a news headline, or date, for example. What you are talking about, though; storing news in XML-format, is very practical and quite easily done. If you look at the Moreover news feeds, you'll see that XML is one of the formats they give their headlines in, and setting up a script to understand these feeds is quite straight forward. Setting up a script to right XML is equally straight forward, and probably worth the time and effort when compared with the time you might save in the long-term.

    -Aonghus


Bookmarks

Posting Permissions

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