Regarding error in loading the xml in jsp page

loadXML not working

When I using loadXML function I got two alert messages

1) Error type:LoadXML

Descriptin :Incorrect XML

2) Error type:DataStructure

Descriptin :XML refers to not existing parent

I have write data to file while calling an ajax function (using java) and then loading this file like this

function get_method()



var url = “/treestructure/”;“GET”,url,true);

req.onreadystatechange = load_districts;


} // end of get_districts()

function load_districts()


if(req.readyState == 4)


if(req.status == 200)


alert(‘this is get_district function()’);

//var xmlDoc = req.responseXML;

tree2=new dhtmlXTreeObject(“treeboxbox_tree2”,“100%”,“100%”,0);







}// end of if(xmlRequest.status==200)

} // end of if(xmlRequest.readyState==4)

} // end of load_districts()


The file is like this

<?xml version='1.0' encoding='iso-8859-1'?>




pls help me out.

Advance Thanx

You are need not load XML through custom code, the component already has all necessary to load data correctly, it can be done as

tree2.loadXML( “/treestructure/”);

In common case, the same error occurs when incoming XML stream contains some syntax errors. … rt_comprob