SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xml how much can you store?

    Im thinking about using xml and xslt to create a site just for testing, but how much data can you store in xml? I mean when you have a few thousand articles it would be better to use a database then xml file correct?

    I dont really like the idea of storing articles in mySql then converting to xml and then xslt converting it to xhtml.. so is it wise to store everything in xml or is it still better to use a database and directly output it in xhtml ?
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  2. #2
    SitePoint Zealot metacube's Avatar
    Join Date
    Jun 2005
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Having a thousand odd articles in a single file would be pretty bad for performance. Couldn't you seperate the articles into seperate files?

  3. #3
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    The Caribbean
    Posts
    267
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you aren't wanting to store things in a database, you may be better off using 2 or 3 different xml files:

    The first one could store only a few things about the article, such as title, summary, author, date, etc. The second xml file would store only the article text. That way, say you are doing a listing of recent articles on your main page - you'd only need to read through the (much smaller) first xml file to get the information you need. The second xml file would only be read when the full article text is needed.

  4. #4
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm so it is actually better to first store it in the database and then to xml? But what i dont get.. is what advantages does xlst bring when you can just as well controll the output in php?

    Im curious about a good way to use this technology in an application?
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  5. #5
    SitePoint Evangelist elgumbo's Avatar
    Join Date
    Nov 2002
    Location
    North West, UK
    Posts
    545
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm just starting to look at XML but the main advantage as far as I can see is that you can distribute your data more easily as it is not reliant on a user having access to the same database or programming language thet you used on your site.

  6. #6
    SitePoint Wizard Nikolas's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    1,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best way is MySql -> xml -> xslt because it is the only way that gives you the abillity to change your content.

  7. #7
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not sure im following you?

    But you could just as well do MySQL -> PHP -> XHTML or MySQL -> PHP -> WML
    i understand you can use the information an any langauge you want, but for a pure website where you are not going to write a client in for example C++ it would have no use ? Or would it ?

    Quote Originally Posted by Nikolas
    The best way is MySql -> xml -> xslt because it is the only way that gives you the abillity to change your content.
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  8. #8
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    The Caribbean
    Posts
    267
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Nikolas
    The best way is MySql -> xml -> xslt because it is the only way that gives you the abillity to change your content.
    What about making changes to the xml files directly? There seem to be some nice pear modules for doing just that, and you can bypass the SQL database entirely.

  9. #9
    SitePoint Wizard Nikolas's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    1,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes but this doesn't give you the abillity to make some data mining - manipulation to your system. For example if the site grows a lot it will be easier to make changes through the database (propably through another aplication that will connect to your database)

  10. #10
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just XML is good enough, than storing your whole articles in database.

    And I have heard nothing about how large an XML can be.


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
  •