title: get SVG child element attributes in Internet Explorer
body: <p>I want to retrieve declared SVG attributes programmatically. It's all inline content, something like this:</p>
  
  <pre><code>&lt;svg&gt;
  &lt;path d="###########"&gt;
      &lt;animate from="5" to="0" begin="3s" dur="1s" etc etc&gt;
  &lt;/path&gt;
  &lt;/svg&gt;
  </code></pre>
  
  <p>Sounds easy peasy, right? But I'm hitting a wall. I've read <a href="https://jwatt.org/svg/authoring/" rel="nofollow">this</a>, but for starters:</p>
  
  <pre><code>document.getElementsByTagName('path');
  </code></pre>
  
  <p>doesn't seem to work in IE, which is the major trouble spot. It always returns undefined.</p>
  
  <p>(I am aware that <a href="http://msdn.microsoft.com/en-us/library/ie/gg193979" rel="nofollow">IE only supports scripted animation</a>, that's the whole occasion for this.)</p>
  
  <p>Anyways, the "get" part works in Chrome, but when this Nodelist is logged in Dev Tools the console returns an unhelpful</p>
  
  <pre><code>[object Nodelist]
  </code></pre>
  
  <p>and when I log individual paths I get a similar:</p>
  
  <pre><code>[object Text]
  </code></pre>
  
  <p>which is all too similar to IE, and not the usual detailed javascript object, making it hard to tell what's happening under the hood. Lastly, when I try to retrieve the declared attributes of the animation:</p>
  
  <pre><code>.getAttributeNS(null, 'dur')
  </code></pre>
  
  <p>doesn't seem to work either, even in Chrome. Dev Tools says that the path object text has no 'getAttributeNS' method. Ditto for plain old 'getAttribute'. I've also tried ".contentDocument" on the SVG file but that doesn't work either. Basically, I have no trouble at all <em>setting</em> these values in any browser a la:</p>
  
  <pre><code>animation.setAttributeNS(null,'begin',startTimeRounded + 's');
  </code></pre>
  
  <p>I just can't seem to <em>get</em> them. Any guidance highly appreciated.</p>
  
  <p>P.S. jQuery selectors don't work on SVG elements, and besides I'd rather not have to load a library to address this one little issue.</p>
  
  <p>P.P.S. I'm iterating over an enormous quantity of paths, so answers that suggest setting unique IDs for each element aren't helpful in this case. I want to get the elements by name. Cross-browser is best, but it must work in IE...</p>