Adding ability for user to pass in DOMDocument and DOMXPath objects for table.