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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:17:50+00:00 2026-05-12T08:17:50+00:00

I am not sure if this is possible, I am working on a website

  • 0

I am not sure if this is possible, I am working on a website that I do not have access to any kind of MYSQL or database. Nor any PHP. Cheap Client

Regardless I have 3 XML files with different parts of data, I have placed a “key” that matches each other. I believe a simple IF statement will do the matching.

However what is the best way to call 3 XML files and pull data out of all of them, and combine them into a loop.

Here is the code that works to pull one of them:

 $.ajax({
  type: "GET",
  url: "xml/classes.xml",
  dataType: "XML",
  beforeSend: function(){
    $('#classContainer').append("<p>Loading</p>");},
  success: function(xml) {
    $(xml).find('monday').each(function(){

            var $classdate = $(this); 
            var title = $classdate.find("class").attr('title');

            var level = $classdate.find("class").attr('classLevel');
                var time = $classdate.find("time").text();
                var duration = $classdate.find("time").attr("duration");
                var hourofday = $classdate.find("time").attr("hourofday");
                var location = $classdate.find("location").text();



            var Monhtml = '<div class="classBlock">';

            Monhtml += '<p class="title">' + title + '<span class="loadingPic" alt="Loading" /> ' + ' </p>';
                Monhtml += '<p class="infoBar"> <strong>Time:</strong>' + time + '<span class="hour">'+ hourofday +'</span><br>'+'<strong>Duration:</strong>' + duration +' Minutes <br>' + '<strong>Location:</strong>' + location + '<br><strong>Instructor:</strong> </p>';
                Monhtml += '<p class="description">  <span class="level">' +  level  + '</span></p>' ;

            Monhtml += '</div>';


            $('#classContainer').append($(Monhtml));
        });
        }
    }); 

I would like to create a variable to be placed in “monHTML” I would have a set of variables from 3 XML documents all merged into the “monHTML” var.

Any Ideas”?

  • 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-12T08:17:51+00:00Added an answer on May 12, 2026 at 8:17 am

    Since you can’t merge the files on the server you will need to perform 3 independent ajax requests. The difficulty consists into synchronising the 3 requests. They can be performed synchronously but this will definitely hurt the performance and could cause timeouts. A better way is be to send the 3 requests asynchronously and invoke a callback once the 3 requests finish:

    var addreses = ['xml/file1.xml', 'xml/file2.xml', 'xml/file3.xml'];
    
    var ajaxQueue = {
        files         : [],
        checkFinished : function() {
            if (this.files.length == addresses.length) {
                // You can work with the 3 xml files here...
                // this.files will be an array of elements that contain
                // url and xml parameters. Check the url parameter to identify the 
                // corresponding xml. 
                // Remark: as the order in which the requests finish can vary, the array
                // will not be sorted.
            }
        };
    };
    
    $(addreses).each(function(index, address) {
        $.ajax({
            url      : address,
            dataType : 'xml',
            success  : function(data) {
                ajaxQueue.files.push({ url: address, xml: data });
                ajaxQueue.checkFinished();
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not sure this is possible, but looking to write a script that would return
I'm not sure if this is possible (complete non-flash developer speaking), but we have
Not sure if this is possible in Iphone sdk since i have not been
I am not sure if this is even possible, with that said... below is
I'm not even sure this is possible... I'll show you what I'm working with,
I'm not sure this is possible, but in ruby, you can dynamically call a
I'm not sure this is possible, but is there a syntax to be used
Not sure if this is possible. I want to grab the latest X stories
Not sure if this is possible in one Makefile alone, but I was hoping
I'm not sure if this is possible but I want to see objects created

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.