Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8988669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:03:31+00:00 2026-06-15T22:03:31+00:00

I have 3 files, (htm, xml, js) to work together fine in IE8, but

  • 0

I have 3 files, (htm, xml, js) to work together fine in IE8, but in IE10 the javascript cannot get xml element:

getxml.htm

<html>
    <head><title>getxml.htm</title></head>

    <xml id="myxml" src="myxml.xml"></xml>
    <script src="getxml.js" language="javascript" type="text/javascript"></script>
</html>

myxml.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<publish>
</publish>

getxml.js

get_xml_content();
function get_xml_content() {
    alert("get_xml_content");
    alert(myxml);       // ie8: [object], ie10: [object HTMLUnknownElement]
    var xmle=myxml.getElementsByTagName("publish").item(0);  
    alert(xmle);        // ie8: [object], ie10: null
}

Alert message from IE8 and IE10 are written as comments above in getxml.js.

Appreciate any help, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:03:32+00:00Added an answer on June 15, 2026 at 10:03 pm

    According to a blog post at the IEBlog, IE10 does not support XML Data Islands when running in Standards mode. This brings IE10 into conformance with how other browsers parse HTML.

    To get this to work in IE10, you need to load the page in legacy mode. You can do that by including the X-UA-Compatible meta tag:

    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    

    A more cross-browser approach would be to link the XML with an <iframe> instead:

    <iframe id="myxml" src="myxml.xml" />
    

    Of course, you’ll need to hide it with a bit of CSS:

    iframe { display: none; }
    

    Reference contentDocument to parse the document:

    var myxml = document.getElementById("myxml").contentDocument;
    var xmle=myxml.getElementsByTagName("publish").item(0);  
    alert(xmle);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 file as following : output-xml.php phpsqlajax_map.htm database.php In order to get
I have this in my htm file <select id=SelItem> </select> Within my javascript file
I have files with texts an constants. How can I get constant name and
I have a sample htm file with following structure and it POSTs the xml
I have built two XML files that map the content of a given folder:
I have at least 100 xml files each about 300 MB with email messages
I currently have a file abc.htm in my Custom Server Control Project and it's
I have written a code in which i want to open a HTM file
I have files served like so: AJAX request handler -> Include file I would
I have files which have many empty cells which appear as NaNs when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.