Hello alls
I have a lot of problem from xml conversion to javascript.
Actually i write a function which return xml . I stored that xml in a variable now
how can i extract node value from that xml. I have try lot of time but i am fail
can you please help me regarding it. My code is below :
AjaxRequest.get(
{
'url':strUrl,'onSuccess':function(req)
{
var Xml_Msg = req.responseText;
var xDoc = loadXMLString(Xml_Msg);
var message = xmlDoc.getElementsByTagName("georadius")[0].childNodes[0].nodeValue;
var result = xmlDoc.getElementsByTagName("result")[0].childNodes[0].nodeValue;
alert(georadius.result);
}
}
);
I want to show message in alert at client side without refresh page. Can you please help me where i am wrong.
if i do : alert(Xml_Msg) ; Its display a xml file like below.
<xml version='1.0' encoding='UTF-8'>
<georadius>
<version>0.3</version>
<message>0.3</message>
<result>0.3</result>
</georadius>
how to read xml data using javascript
Moderator: General Moderators
-
yogendra_kaushik
- Forum Newbie
- Posts: 2
- Joined: Tue Jun 24, 2008 4:04 am