title: jQuery get all elements inside SVG with ID specified
body: <p>I use <a href="http://keith-wood.name/svg.html" rel="nofollow">this jQuery plugin</a> to load SVG image into a div. I'd like to get all the element IDs from the SVG XML data which contain an ID attribute. For example, in my SVG image I have <code>circle</code> and <code>polygon</code> elements with ID attributes, but a <code>rect</code> element without ID attribute. I want to get these two with IDs from the XML.</p>
  
  <p>How do I do this?</p>
  
  <p>I have tried this in the <code>onLoad</code> method of <code>svg</code> function.</p>
  
  <pre><code>$("#image svg").each(function() {
      $("#list").append("&lt;option&gt;" + this.id + "&lt;/option&gt;");
  });
  </code></pre>
  
  <p><code>#image</code> is the container for the <code>svg</code> element and <code>#list</code> is the <code>select</code> tag.</p>