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"?