#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    98
    Rep Power
    13

    Accessing XML documents


    Okey dokey...

    Well, I finally got a good XML template to use for my documents, and a working XSL sylesheet to format it. The only part left for me to figure out is how I'm going to access it. My best thought was to use PHP, and hold it in a database. Then, I'd access it like a normal file. Is there any other/better ways of going about this?
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    You can do that, but there's no reason you couldn't just store them on the filesystem. The only compelling reason to store them in a database would be to perform queries on the documents. This is complicated by the data being in xml format, but not impossible.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    98
    Rep Power
    13
    I wanted to base my site around a template, and then put my include my XML articles within it. Is there a way to call an XML document like that, or would I have to go PHP?
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Have you read the documentation for php's xslt functions? You can get the result of a transformation as a string that can then be echo'd out to your page. xslt_process can take an xml file and an xsl file as arguments, or strings of xml data.
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    98
    Rep Power
    13
    There we go! This should be the answer to help me out. Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo