You can do this by creating an XML document in memory and passing that
to your event source loadXML function.
For example:
var xmlstring = '<?xml version="1.0"?><data>\
<event start="Oct 16 2009 00:00:00 GMT" title="Point event">\
This is my bubble text for a point event\
</event>\
<event start="Oct 16 2009 00:00:00 GMT" end="Oct 17 2009 00:00:00 GMT"\
isDuration="true" title="Long event">\
This is the bubble text for the long event\
</event>\
</data>';
try // Internet Explorer
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(xmlstring);
}
catch(e)
{ // Firefox and Safari
parser=new DOMParser();
xmlDoc=parser.parseFromString(xmlstring,"text/xml");
}
url = "/";
eventSource.loadXML(xmlobject, url);
--Mike Nosal
On Oct 13, 2009, at 7:00 AM, Quim wrote:
>
> Hi
>
> I search this forum in order to find code to use XML data directly
> without using a file.
> I saw a few posts but none of them post the code.
> I'm using an ASP.NET application where I get SQL Server data and I
> want to feed TimeLine without saving a XML file.
> How can I do it?
>
> Thanks
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---