I don't see you telling the browser to expect XML anywhere in that code. So probably the browser is expecting HTML, and ignoring any elements which it doesn't recognize. You might consider using the browser's "view page source" to see what the browser actually gets, as opposed to how it interprets what it gets.
* actually what i need is i want to send this xml file to client (phonegap) , there i actually parse the xml so am using jquery ajax function
* inside of jquery-ajax i use sucess: function(data)-receive my xml file from servlet
* it is possible any other way to send my xml file to my client
Durga Roobini wrote:ya i agree what you saying, so it is not recognize my xml file ,means there is no other way to display my xml file in browser
Sure, you just have to set the content type appropriately.
actually what i need is i want to send this xml file to client (phonegap) , there i actually parse the xml so am using jquery ajax function
In which case you don't actually need to deal with the browser at all. So stop worrying about the browser because it isn't part of your problem.
it is possible any other way to send my xml file to my client
That IS the way to send the XML to the client, assuming that the request came from the client. You're just confused because you happened to choose a bad tool to test with.
in client side using
$.support.cors = true;
dataType: "xml", //here am using datatype:text means it print text from servlet output else it returns null value
success: function(data) //it goin in sucess part
// i print data here it returns null because my servlet browser have text but above i mention datatype:xml so it returns null [so only i want xml output in browser means client side problem will clear]
/// parsing xml codings
please help me soon am struck here long time