FileDocCategorySizeDatePackage
XalanDOMTestDocumentBuilderFactory.javaAPI DocAndroid 1.5 API2485Wed May 06 22:41:04 BST 2009org.w3c.domts

XalanDOMTestDocumentBuilderFactory

public class XalanDOMTestDocumentBuilderFactory extends JAXPDOMTestDocumentBuilderFactory
This class uses Xalan-J to add XPath support to the current JAXP DOM implementation

Fields Summary
Constructors Summary
public XalanDOMTestDocumentBuilderFactory(DocumentBuilderFactory baseFactory, DocumentBuilderSetting[] settings)
Creates a JAXP implementation of DOMTestDocumentBuilderFactory.

param
factory null for default JAXP provider. If not null, factory will be mutated in constructor and should be released by calling code upon return.
param
settings array of settings, may be null.

    super(baseFactory, settings);
  
Methods Summary
protected DOMTestDocumentBuilderFactorycreateInstance(javax.xml.parsers.DocumentBuilderFactory newFactory, DocumentBuilderSetting[] mergedSettings)

    return new XalanDOMTestDocumentBuilderFactory(newFactory, mergedSettings);
  
public java.lang.ObjectcreateXPathEvaluator(org.w3c.dom.Document doc)
Creates XPath evaluator

param
doc DOM document, may not be null

    try {
      Class xpathClass = Class.forName(
          "org.apache.xpath.domapi.XPathEvaluatorImpl");
      Constructor constructor = xpathClass.getConstructor(new Class[] {Document.class});
      return constructor.newInstance(new Object[] {doc});
    }
    catch (Exception ex) {
    }
    return doc;