How to get the value of attribute of xml element containing URL

How to get the value of attribute of xml element containing URL

Hi there,

I have an xml node like this

  1. <warnings url="http://abc.xyz.com/test.html?xy=15">
  2.       <<event desc="this is a test">
  3. </warnings>

I tried the following line of code

  1. console.log($(this).find("warnings").attr("url"));

which gives me undefined but when I try

  1. console.log($(this).find("event").attr("desc"));

I get "this is a test". Because the URL has some special characters such as : / ? = am I getting undefined?  How do I get this url value?

Thanks for your help

Joe