السؤال XML Data Island

  • Monday, December 31, 2012 5:23 PM
     
     

    Hi,

    We are using xml data island in our application which seems to work great in quirks mode but when switched to IE8 or IE9 standards mode XML data island does not work. Is there a different way of using XML data island in IE9 standards mode or is there a replacement for xml data island which I can use in IE9 standards mode.  Please advise, thanks.

All Replies

  • Monday, December 31, 2012 7:09 PM
     
     

    With IE 9 (and 10 I suppose) there are APIs exposed to Javascript to parse and create XML documents and to serialize them i.e. DOMParser, XMLSerializer, document.implementation.createDocument which are part of the W3C DOM or were already supported in other browsers like Mozilla or Opera. And of course there is XMLHttpRequest.

    Data-binding to XML is no longer supported, if that is the feature of XML data islands you want to use. You would need to write code with Javascript to extract the data and insert it as needed.

    That is a rather general answer but as there are many uses to data islands you would need to tell us exactly what you do with them to get more specific hints.


    MVP Data Platform Development My blog

  • Wednesday, January 02, 2013 6:24 PM
     
      Has Code

    Hi Martin,

    Thanks for the response. We bind xml data to table cells so the data rows are automatically generated.  Here is the code snippet of how I bind it to table cells:

    <xml id="RecentlyEdited" src="<Computed Value>" ondatasetcomplete="SetDataDisplay(this);"></xml>
    <!---------------RecentlyEdited Message --------------------------->
    <span id="NoRecentlyEditedMsg" style="font: 12px verdana,arial;display: none">No entries found.</span>
    <!---------------------- Data table ------------------------------>
    <div id="divRecentlyEdited" style="display: none; width: 100%;">
    <table id="tblRecentlyEdited" datasrc="#RecentlyEdited" style="width: 100%; table-layout:fixed;">
    <tr onMouseOver="SetRowColor(this, true)" onMouseOut="SetRowColor(this, false)" onclick="OpenDocument(RecentlyEdited.recordset, this.recordNumber);">
    <td width="20px;" valign="middle" class="ListItem">
    <span style="font: normal 15px Webdings;color: #ff9900" datafld="typeicon" dataformatas="html" ></span>
    </td>
    <td class="ListItem">
    <span datafld="Title" style="color: #000000;"></span><br/>In library: <span datafld="LibraryName" style="color: #000000;" ></span>&nbsp;Modified: <span datafld="LastModifiedDate" style="color: #000000;"></span>
    </td>
    </tr>
    </table>
    </div>

    Also I was looking at JSON as an alternative for xml data binding  ... still investigating to find an option where its easy to bind similar to data island. I am also looking at some of these frameworks but still not sure which direction to go:

    • knockoutjs
    • AngularJs
    • BackBone

    -DV

  • Thursday, January 03, 2013 10:10 AM
     
     
    I think the IE web development forum is a better place to find help with client-side development problems and the use of JSON or frameworks built on top of Javascript.

    MVP Data Platform Development My blog