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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:54:24+00:00 2026-06-03T08:54:24+00:00

I need to get a xml string from the server, which is formatted as:

  • 0

I need to get a xml string from the server, which is formatted as:

<xml><material>
<record>
<id>..</id>
<name>..</name>
<quantity>..</quantity>
<plink>..</plink>
</record>
<record>
..
</record>
</xml></material>

Client side get this xml and process it:

$.ajax({
  url:'getrecords.php',
  cache:false,
  type:"GET",
  dataType:'html',
  success:function (html){
    var records=$(html).find("record");
    alert(records.length);
  }

My problem is that, this code is working fine in Chrome and Firefox but not in IE 8.0 (I am using 8.0) It alerts 0 in IE while it alerts the correct length in chrome and firefox.

I try this but it also shows length of records is 0 in IE but fine in Chrome

var records=$("<xml><root><item></item></root></xml>").find("item");
  • 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-03T08:54:26+00:00Added an answer on June 3, 2026 at 8:54 am
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script src="../../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                var xml = '<?xml version="1.0" encoding="utf-8" ?><material><record><id>1</id><name>A</name><quantity>10</quantity>'
                        + '<plink>test</plink></record><record><id>2</id><name>B</name><quantity>20</quantity><plink>test1</plink>'
                        + '</record><record><id>3</id><name>C</name><quantity>34</quantity><plink>test2</plink></record><record>'
                        + '<id>4</id><name>B</name><quantity>45</quantity><plink>test6</plink></record></material>';
    
    
    
                //            $.ajax({
                //                url: 'getrecords.php', cache: false, type: "GET", dataType: 'html',
                //                success: function (xml) { 
                var data = $($.parseXML(xml));
                var records = $(data).find('record');
                alert(records.length);
                //                }
                //            });
            });
        </script>
    </head>
    <body>
        <?xml version="1.0" encoding="utf-8" ?>
        <material>
      <record>
        <id>1</id>
        <name>A</name>
        <quantity>10</quantity>
        <plink>test</plink>
      </record>
      <record>
        <id>2</id>
        <name>B</name>
        <quantity>20</quantity>
        <plink>test1</plink>
      </record>
      <record>
        <id>3</id>
        <name>C</name>
        <quantity>34</quantity>
        <plink>test2</plink>
      </record>
      <record>
        <id>4</id>
        <name>B</name>
        <quantity>45</quantity>
        <plink>test6</plink>
      </record>
    </material>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to communicate with an XML-RPC server from a .NET 2.0 client. Can
I need to use POST to post a string to server and get xml
How could I get the data from a xml, which is generated with php,
I am new to iPhone. I need to get images from a local XML
I need to get the xml path opf the xml file by providing the
I am in the contentview of seekbarlist.xml and need to get the layout of
For example i have this xml. I need to get value of parameter val
I have an html-like xml, basically it is html. I need to get the
below is the chunk of XML i get as input and i need to
In one's server, file_get_contents is disabled for security reasons. I need to retrieve xml

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.