/src/main/java/org/htmlunit/html/xpath/HtmlUnitPrefixResolver.java
else {
else if ( namespaceContext instanceof DomElement ) {
if (namespaceContext instanceof XmlPage) { final DomElement documentElement = ((XmlPage) namespaceContext).getDocumentElement(); if (documentElement != null) { namespace = getNamespace(documentElement, prefix); } } <extra_id_0> namespace = getNamespace((DomElement) namespaceContext, prefix); } } return namespace; } private String getNamespace(final DomElement element, final String prefix) {