title: How do you find out what element type the root element is with jquery
body: <p>I'm sending an ajax request that will either give me an error or a userID</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;error&gt;1000&lt;/error&gt;
  
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;userID&gt;8&lt;/userID&gt;
  </code></pre>
  
  <p>how can I find out if the root element is error or userID using jquery or just javascript in general. Using the find method doesn't appear to work if what you're trying to access is the root element</p>