Empty responseXML
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mangesh_Kulkarni
Posted On:   Wednesday, January 10, 2007 05:22 AM

CASE: i am calling a servlet from ajax which gives DOM in browser , catalina even in responseText still the DOM object i am creating in javascript is getting null. 1) set contentType : text/xml 2) Tried for hard coded data in url browser 3) response text is getting as expected code snippet : if (reqProcessObj.status == 200) { alert(reqProcessObj.responseText); var xmlDoc2=""; xmlDoc2=reqProcessObj.responseXML.documentElement; var processStatus=xmlDoc2.getElementsByTagName("STATUS")[0]; var msg=processStatus[0].getAttribute("MESSAGE"); alert("Message ="+msg); } and the DOM at s   More>>

CASE: i am calling a servlet from ajax which gives DOM in browser , catalina even in responseText still the DOM object i am creating in javascript is getting null.
1) set contentType : text/xml
2) Tried for hard coded data in url browser
3) response text is getting as expected


code snippet :
if (reqProcessObj.status == 200)
{

alert(reqProcessObj.responseText);

var xmlDoc2="";
xmlDoc2=reqProcessObj.responseXML.documentElement;

var processStatus=xmlDoc2.getElementsByTagName("STATUS")[0];

var msg=processStatus[0].getAttribute("MESSAGE");
alert("Message ="+msg);
}


and the DOM at server side is like

<?xml version="1.0" encoding="UTF-8" ?>


   <<Less
About | Sitemap | Contact