How do I process XML using JQuery in Internet Explorer?

Posted on 2008-06-12
Last Modified: 2013-12-08
I am experiencing a problem processing a simple xml document using jquery in internet explorer. The idea is to parse selected elements off of the xml document and then append to the DOM. I have it working correctly in Firefox 2, but Internet Explorer 6 SP 2 is raining on my parade. Please see code snippet below for guidance. Thanks in advance.
html and javascript


<!DOCTYPE html PUBLIC "-//W3C//  DTD HTML 4.01//EN"




     <meta content="text/xml; charset=iso-8859-1" http-equiv="Content-Type">

     <title>Address book</title>

     <script src="jquery.js" type="text/javascript"></script>

     <script type="application/javascript">

     $(function() {

         $('#update-target a').click(function() {


                 type: "GET",

                 url: "label.xml",

                 dataType: "text/xml",

                 success: function(xml) {


                         var id_text = $(this).attr('id')

                         var name_text = $(this).find('name').text()



                             .html(name_text + ' (' + id_text + ')')

                             .appendTo('#update-target ol');

                     }); //close each(


             }); //close $.ajax(

         }); //close click(

     }); //close $(





       <div id='update-target'>

         <a href="#">Click here to load addresses</a>







xml file



<label id="mj">

<name>Michael Jordan</name>


<label id="kb">

<name>Kobe Bryant</name>



Open in new window

Question by:JayKing81
LVL 82

Accepted Solution

hielo earned 125 total points
ID: 21837549
try changing:
<script type="application/javascript">

<script type="text/javascript">

Author Closing Comment

ID: 31466647
I actually figured this out a little while back, but you hit on the head. IE didn't like the application/javascript tag. Thanks.

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now