Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 08, 2008 09:00
open dhtmlx forum
loading XML data internal

is there any way to load the XML directly in working file instead of useing external XML file to load date into dhtmlTree.

tree.loadXML("../xml/data.xml"); now i'm useing this, Istead of useing this can i push XML content directly in working file.. ?
Answer posted by Support on Feb 08, 2008 09:25
Sure, samples uses static xml , but you can use any kind of server side scripting
    tree.loadXML("../xml/data.php");  //or jsp/aspx/cf

The next online sample loads data directly from PHP script
    http://dhtmlx.com/docs/products/dhtmlxGrid/samples/loading_big_datasets/50000.html?un=1202492308000

Basically you need just set correct content type of output ( text/xml ) and output XML data by server side script.



Answer posted by Support on Feb 08, 2008 09:25
If you want to load data from the same file, you can store data as any kind of string and use

    grid.loadXMLString(string_here);