javascript - How can i parse XML response by a function using jquery? -


i have function giving me response in xml format , want value of attribute xml using jquery ? please

var xml = api.getallavailablemarkups();  alert(xml)    xmldoc = $.parsexml( xml );   $xml = $( xmldoc );   $title = $xml.find( "uri" );   alert( $title.text() ); 

this code : 1. getting object in first alert , in 2nd alert blank ..
2. uri tag available in response xml

  1. this respones getting api.getallavailablemarkups(); nishant.com

if getting first alert undefined response not sent or response not received response. check out on server side if response if being sent. or create fiddle. otherwise, code . have done job their. check out api used.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -