handle errors internally

Reduces granularity
Assumes ```DomDocument::getElementsByTagName()``` will return elements in order of occurrence but no guarantee is made by the documentation or standard.

http://php.net/manual/en/domdocument.getelementsbytagname.php
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-71555259

This is hopefully not an issue in practice but should be noted.