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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:13:22+00:00 2026-05-24T18:13:22+00:00

I have an XML file that is pretty long. Below is the code I

  • 0

I have an XML file that is pretty long. Below is the code I am using to retrieve the file and then go through the file using jQuery’s .each(), outputting the correct information:

$(document).ready(function(){
$.ajax({
    type: "GET",
    url: "data.xml",
    dataType: "xml",
    success: function(xml) {
        $(xml).find('Table').each(function(index){
            var provider = $(this).find('Provider').text();
            var channel = $(this).find('FeedCommonName').text();
            var hd = $(this).find('FeedIsHD').text();
                $('.box ul').append('<li>'+channel+'</li>');
        });
    }
});
});

The problem I’m having is the code only gives me up to element 31. I added the index variable in to see that, and it is giving me an index from 0 to 30. So is there some limitation that .each() only goes up to an index of 30, and if so, is there another way to go through the XML file? Thanks.

EDIT: Solved, at least for now. There were &’s in the XML file, which was holding up the processing. I guess another reminder to validate your source file first.

  • 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-24T18:13:23+00:00Added an answer on May 24, 2026 at 6:13 pm

    Try using parseXML before you find the element

    $(document).ready(function(){
      $.ajax({
        type: "GET",
        url: "data.xml",
        dataType: "xml",
        success: function(xml) {
            $.parseXML(xml).find('Table').each(function(index){
                var provider = $(this).find('Provider').text();
                var channel = $(this).find('FeedCommonName').text();
                var hd = $(this).find('FeedIsHD').text();
                $('.box ul').append('<li>'+channel+'</li>');
            });
        },
        error: function() {
            $('.box ul').text("Failed to get xml");
        }
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML file that has a number of nodes, each of which
I have an XML file that is very long, but here is a shot
I have an xml file that I want to configure using a bash script.
We have an odd problem, we are tranforming a pretty complicated XML file using
So I have this pretty large XML file (40MB) that I'll have to repeatedly
Pretty lame problem: I have an xml file that gets updated everyday on a
I have an xml file that I'm using etree from lxml to work with,
Ok, so I have an XML file that pretty much looks like this: <Templates>
I have an XML file that starts like this: <Elements name=Entities xmlns=XS-GenerationToolElements> I'll have
I have an XML file that encodes a directed acyclic graph (DAG) that represents

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.