Feeling really lost with this XML stuff.

Discussion in 'XML & RSS' started by 5ybarite, Nov 13, 2006.

  1. #1
    Hey all,
    this kinda seems like the place for this question; I've spent the last several hours pouring over everything I could find on XML, tried to read several threads and forums and went to the W3C school page and all that. I feel like I'm starting to grasp the scope of functionality with regard to XML as it pertains to the way I wish to use it.

    Essentially, I just want to make some html (or shtml as the case may be) pages which are fed by very basic .xml documents so that, perhaps, instead of updating 16 pages with a new tip, i can update once. Instead of updating 16 pages with news teasers, I can update once. Am I on the right track? Or is it bad policy to have multiple .xml documents feeding one page?

    Can anyone suggest how I get the last mile here and actually make this thing work? Are there good examples I can learn from somewhere? What I saw was kind of above my head.

    thanks in advance.
    ~5yb
     
    5ybarite, Nov 13, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    not saying XML couldn't do what you want but...

    server side includes or php includes would probably be easier :)

    
    <?
    include "everypage.php";
    ?>
    
    Code (markup):
    put in your pages and all of the contents of "everypage.php" will show up on every page that includes it. then you just update everypage.php when you want to change something.
     
    disgust, Nov 13, 2006 IP
  3. 5ybarite

    5ybarite Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    is that a better use? Is XML relegated to a mock DB? I'll be honest, the next step was to figure out a way to rotate them so that if I have an XML document with 50 tips a different one would be loaded each time. It just seems like it would be a hop, skip & a jump to get there.

    Am I barking up the wrong tree?
    thanks,
    ~5yb
     
    5ybarite, Nov 13, 2006 IP
  4. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #4
    I suggest you look into a server side scripting language like PHP or ASP(.net) . Using either one of these you can build dynamic websites such as the ones you want to make. XML is just used as a standard format for data storage/transfer between programs. You will need something that allows for logic such as a PHP script to cycle between the files. It maybe best to store your tips as xhtml and not xml if all you want to do is display them on the web. Edit: Or better yet use a database system like mysql.
     
    abdussamad, Nov 17, 2006 IP