Help! Xml & html

Discussion in 'HTML & Website Design' started by BuntaFujiwaraaa, Dec 28, 2012.

  1. #1
    I'll like to make my HTML sites more manageable by calling data from external files, maybe XML or something? I've looked around for the topic XML and it seems the topic itself is quite big and is either too plain or too difficult that I do not understand. And some of the tutorials are very very old like 1999 or something.

    Or i wanted to do, is to call data from external XML.

    For example, a text inside an HTML like...

    <p> "Something called from outside" </p>

    Then inside an XML...

    "Something called from outside" (When i changed that line, it will also change the text in the HTML).
     
    BuntaFujiwaraaa, Dec 28, 2012 IP
  2. BuntaFujiwaraaa

    BuntaFujiwaraaa Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok lets say a normal figure caption tag inside a HTML.

    <figure>
    <img src="img.png">
    <figcaption> Image 1 </figcaption>
    </figure>

    <figure>
    <img src="img2.png">
    <figcaption> Image 1 </figcaption>
    </figure>

    <figure>
    <img src="img3.png">
    <figcaption> Image 1 </figcaption>
    </figure>

    So somewhere in my folders, thats a file called data.xml
    1) I open data.xml with Text editor.
    2) I change the text "Image 1" to "Image 2"
    3) All three figures captions will change from text "Image 1" to "Image 2"
    4) This way I do not have to go into HTML and change all the three texts "Image 1" - I can just go into data.xml change one line and everything will follow suit.

    Thanks!! :)
     
    BuntaFujiwaraaa, Dec 28, 2012 IP