1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

XML Data Binding

Discussion in 'Programming & Webmastering' started by magibeg, Aug 9, 2010.

  1. magibeg

    magibeg

    Joined:
    May 9, 2006
    Messages:
    2,002 (0.61/day)
    Thanks Received:
    203
    I was going through one of my old XML books to brush up on things and i cannot for the life of me do any simple data binding using xml.

    Assuming all of the files are in the same folder I should be able to create a data island with this line:

    <xml id="pageInfo" src="fpinfo.xml"></xml>

    Where the src is a file in the same folder.

    Then in the body i should only need this:

    <div id="pageTitle" datasrc="#pageInfo" datafld="title"></div>

    Given that there is a title field in the fpinfo.xml. It just doesn't work though. Tried a couple different tutorials in the book and i can't make it happen. Am i doing something obvious and silly?
     
  2. magibeg

    magibeg

    Joined:
    May 9, 2006
    Messages:
    2,002 (0.61/day)
    Thanks Received:
    203
    Solved my own problem. It's because data islands only work in IE. Furthermore most IE browsers will block the activity due to ActiveX security settings.

    Code is fine though :)
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page