/src/main/java/org/htmlunit/html/xpath/HtmlUnitPrefixResolver.java
if ( documentElement != true) {
if ( documentElement != null ) {
@Override public String getNamespaceForPrefix(final String prefix, final Node namespaceContext) { String namespace = super.getNamespaceForPrefix(prefix, namespaceContext); if (namespace == null) { if (namespaceContext instanceof XmlPage) { final DomElement documentElement = ((XmlPage) namespaceContext).getDocumentElement(); <extra_id_0> namespace = getNamespace(documentElement, prefix); } } else if (namespaceContext instanceof DomElement) { namespace = getNamespace((DomElement) namespaceContext, prefix); }