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 1035893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:36:54+00:00 2026-05-16T14:36:54+00:00

I have some XML that I am parsing in jQuery. <payload> <value key=VehicleMake> <value

  • 0

I have some XML that I am parsing in jQuery.

<payload>
    <value key="VehicleMake">
        <value key="description">Aeon</value>
        <value key="code">18</value>
    </value>
    <value key="VehicleMake">
        <value key="description">Alfa Romeo</value>

        <value key="code">120</value>
    </value>
</payload>

In all browsers except IE (specifically IE8) the following works:

$.ajax({
    type : "GET",
    async : false,
    url : "/services/vehiclemake",
    success :
        function(xmlResponse) {
        var data = $("payload", xmlResponse).children("value").map(function() {     
            //IE8 fails on the next line
            var code = $(this).children("value [key='code']").text();
            var desc = $(this).children("value [key='description']").text();
            return {
                value : desc,
                vehicleCode  : code,
                label : desc
            };
        }).get();
    }
});

In IE8 it fails on the assignment to ‘code’ saying : “TypeError: Object doesn’t support this property or method”.

If I use this approach then it is fine:

$.ajax({
    type : "GET",
    async : false,
    url : "/services/vehiclemake",
    success :
        function(xmlResponse) {
        var data = $("payload", xmlResponse).children("value").map(function() {
            var code;
            var desc;           
            var elements = $(this).children();
            for (i = 0; i < elements.length; i++) {
                if(elements[i].attributes.getNamedItem("key").value == 'code') {
                    code = elements[i].text;
                }
                if(elements[i].attributes.getNamedItem("key").value == 'description') {
                    desc = elements[i].text;
                }
            }
            var desc = $(this).children("value [key='description']").text();
            return {
                value : desc,
                vehicleCode  : code,
                label : desc
            };
        }).get();

Can anyone tell me why the standard jQuery attribute selectors are not working in IE8? The XML is being returned with the correct mime type.

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-05-16T14:36:55+00:00Added an answer on May 16, 2026 at 2:36 pm

    I don’t think you want a space here:

    .children("value[key='code']")
    

    Might not solve it but I think that needs fixing anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
I love jQuery. I am probably going to have some XML parsing and manipulation
I have some code that receives some XML and there is the possibility that
So I have some perl code that goes something like: use strict; use XML::XPath;
I have a file which is an XML representation of some data that is
Greetings! I have some XML like this: <Root> <MainSection> <SomeNode>Some Node Value</SomeNode> <SomeOtherNode>Some Other
I have some XML that has creating using an XmlDocument object in C#. I
I have an application that extracts data from some xml that is stored in
I have an XML web service that javascript calls are made using jQuery. This
I have some XML in an XmlDocument, and I want to display it on

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.