diff --git a/src/MicrodataPhpDOMElement.php b/src/MicrodataPhpDOMElement.php index fd3a9c3..6433f87 100644 --- a/src/MicrodataPhpDOMElement.php +++ b/src/MicrodataPhpDOMElement.php @@ -189,7 +189,7 @@ protected function traverse($node, &$toTraverse, &$props, $root) { // An xpath expression is used to get children instead of childNodes // because childNodes contains DOMText children as well, which breaks on // the call to getAttributes() in itemProp(). - $children = $this->ownerDocument->xpath()->query($node->getNodePath() . '/*'); + $children = $this->ownerDocument->xpath()->query('./*', $node); foreach ($children as $child) { $this->traverse($child, $toTraverse, $props, $root); }