Now I'm confused
The first solution is the one which creates different objects so I assume you want to know more about it
Currently you have this line of code
Code:
var xobject = new getXMLObject();
First of all, you can omit the new keyword here as the function already returns a new object. Also, the calls to the handler() function do not need to have the new keyword.
Code:
var xobject = getXMLObject();
You can create more objects like that
Code:
var xobject = getXMLObject();
var xobject2 = getXMLObject();
Now instead of starting all of the requests with the first object, you can start the second request with the second object and so on.