private function getChildElements(\DOMElement $source) { $xpath = new Xpath($source->ownerDocument); return $xpath('*', $source); }