Using E4X, i can easily access nodes in XML using javascript as follows:
<script language="javascript">
xmldata = <books><book><title>AA</title></book></books>; // notice the no string quotes
alert(xmldata.book.title);
</script>
However, the application returning the data to me is returning XML as string. How can i access using this :
<script language="javascript">
xmldata = '<books><book><title>AA</title></book></books>'; // string quote around the xmldata
alert(xmldata.book.title);
</script>
This would give me a javascript error. Can someone please tell me how i can achieve the earlier result ?