problem initializing dynamic data using xml

I can load xml event data from a file successfully by using scheduler.load(url to xml file). But I need to load the xml dynamically and I am trying to create an xml document with javascript to do that. I will use the code below with dynamic data but I am testing it with an xml file first but it does not work with the file. I get the error “Object doesn’t support this property or method”. Do you have an suggestions?

I am using this code to in internet explorer 8
var xmlDoc;
xmlDoc = new ActiveXObject(‘Microsoft.XMLDOM’);
xmlDoc.async = false;
xmlDoc.load("url to xml file);
scheduler.load(xmlDoc)

Let me make my original post more clear. First forget about the word dynamic in my first post. I think I know my problem. Please tell me if this is correct. The scheduler.load method requires a url not a document object. My code passes the xml document object to the method.

The reason I did that is because I need to transform the xml from my database to the xml schema of dhtmlscheduler. I was using an xml style sheet to transform it in the browser with Javascript.

In my original post I should have said explained the need to transform the data with a stylesheet in the browser using JavaScript. I am successful at transforming the xml in the browser. Do you have any suggestions for the JavaScript that will let me load the transformed xml document that I have created in the browser to dhtmlscheduler, thanks.

scheduler.load requires URL, right.
you can load from xml string by using

scheduler.parse(string)

also, if you are building data on the client side - the simplest approach is create an array of js objects and use

scheduler.parse(myarray, “json”);

to transform it in the browser with Javascript.
Just serialize result to the string and use it in the scheduler.parse method

Thank you. That worked perfectly.