Check for XML_ELEMENT_NODE's where appropriate, some DOM_TEXT_NODE's were slipping through. Removed method_exists checks that should no longer be required.
Potential fix for #7. Now passing an array rather than the array-like-object of DOMNodeList into the 2nd argument of array_map.