Use childNodes rather than getElementsByTagName.

getElementsByTagName() returns all descendants, which means it iterates
over children of things you have already discounted. childNodes returns
only the immediate children.
Merge pull request #1 from dracos/use-childNodes

Use childNodes rather than getElementsByTagName.