XML : How to get tag value using XML using javascript

I am using Translation API that gives me response in XML object, I used XMLSerializer to serialize the object into javascript variable, but the problem is how can I get the specific tag value, the structure of XML is given below, I want to extract the value of <text> tag. Please help

  var text = <?xml version="1.0" encoding="utf-8?">  <Translation code="200" lang="en-ar">"  <text>Everyday Italian</text>  </Translation>    

No comments:

Post a Comment