Example usage for javax.xml.parsers DocumentBuilderFactory isNamespaceAware

List of usage examples for javax.xml.parsers DocumentBuilderFactory isNamespaceAware

Introduction

In this page you can find the example usage for javax.xml.parsers DocumentBuilderFactory isNamespaceAware.

Prototype


public boolean isNamespaceAware() 

Source Link

Document

Indicates whether or not the factory is configured to produce parsers which are namespace aware.

Usage

From source file:com.adaptris.util.text.xml.XPath.java

/**
 * @see XPath#newXPathInstance(DocumentBuilderFactoryBuilder, NamespaceContext)
 *//*  w w  w .j av  a 2s . c o  m*/
public static XPath newXPathInstance(DocumentBuilderFactory builder, NamespaceContext namespaceCtx) {
    // INTERLOK-2255
    XPath xpathToUse = new XPath(namespaceCtx);
    if (builder != null && !builder.isNamespaceAware()) {
        xpathToUse = new XPath(namespaceCtx, XPathFactory.newInstance());
    }
    return xpathToUse;
}