XML datasource object has type HTMLUnknownElemnt in JavaScript, no recordset defined – JavaScript – SitePoint Forums

This question is about using the old Data Island with Microsoft Edge. To simplify my question, I found the following simple HTML example to bind XML data to a table from a Microsoft page with this link:

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms762701(v=vs.85).

I also added the meta tag in the head section of the HTML to emulate IE7. However, the data binding does not work and the fields in the table are not populated with XML data. As far as I know, Microsoft expects the following xml binding code to work correctly.

When I use javascript to check the type of xmlMeetings which is the XML Data Source ID (dso), the type is displayed as an HTMLUnknowElement object. But I expected the object to be known and have all the methods and properties. My intention is to eventually access the recordset, but of course the recordset is not defined for the HTMLUnknowElement which is the dso or xmlMeetings.

According to Microsoft, the IE=EmulateIE7 in the meta tag emulates Internet Explorer 7 when a properly declared doctype is used. In the past, I had no problem binding xml data to a table even if I didn’t pay attention to the correct declaration of the doctype.

Could someone tell me:

1- why does binding of dso data to table not happen? If data binding occurs, I expect to have access to the recordset as well.

2- What is the correct doctype declaration for this HTML page?

Thank you for your help.

I saved the following code in testXML.html file and loaded the page with Microsoft Edge browser. No data binding with the table occurs.


    

    
    
    
    
    
    
    
    1/1/99
    
    104
    
    
    2/1/99
    
    34
    
    
    3/1/99
    
    20
    
    
    

    


Comments are closed.