title: WCF Service returns an XML, how to prase using jquery?
body: <p>i am calling an api for registration and if everything goes well then api returns an xml file </p>
  
  <pre><code>"&lt;?xml version=\"1.0\" encoding=\"ISO-8859-1\"?&gt;\u000a&lt;successNotification&gt;\u000a\u0009&lt;message&gt;Successful web registration&lt;\/message&gt;\u000a\u0009&lt;registrationId&gt;22342347&lt;\/registrationId&gt;\u000a&lt;\/successNotification&gt;"
  </code></pre>
  
  <p>if something wrong then it returns a line of message </p>
  
  <p><code>you are missing something</code></p>
  
  <p>my question is: how can i display message regardless whether it returns xml or just line of message:</p>
  
  <pre><code>$.getJSON('http://localhost:4126/service.svc/alert', { phoneNumber: '01231231233' },
     function (data) {
        var result = $(data).find('message').html;
        display.innerHTML = result;
   });
  </code></pre>