Methods Summary |
---|
protected DOMTestDocumentBuilderFactory | createInstance(javax.xml.parsers.DocumentBuilderFactory newFactory, DocumentBuilderSetting[] mergedSettings)
return new JAXPDOMTestDocumentBuilderFactory(newFactory, mergedSettings);
|
public static DocumentBuilderSetting[] | getConfiguration1()
return new DocumentBuilderSetting[] {
DocumentBuilderSetting.notCoalescing,
DocumentBuilderSetting.notExpandEntityReferences,
DocumentBuilderSetting.notIgnoringElementContentWhitespace,
DocumentBuilderSetting.notNamespaceAware,
DocumentBuilderSetting.notValidating};
|
public static DocumentBuilderSetting[] | getConfiguration2()
return new DocumentBuilderSetting[] {
DocumentBuilderSetting.notCoalescing,
DocumentBuilderSetting.expandEntityReferences,
DocumentBuilderSetting.ignoringElementContentWhitespace,
DocumentBuilderSetting.namespaceAware,
DocumentBuilderSetting.validating};
|
public org.w3c.dom.DOMImplementation | getDOMImplementation()
return builder.getDOMImplementation();
|
public boolean | hasFeature(java.lang.String feature, java.lang.String version)
return builder.getDOMImplementation().hasFeature(feature, version);
|
public boolean | isCoalescing()
return factory.isCoalescing();
|
public boolean | isExpandEntityReferences()
return factory.isExpandEntityReferences();
|
public boolean | isIgnoringElementContentWhitespace()
return factory.isIgnoringElementContentWhitespace();
|
public boolean | isNamespaceAware()
return factory.isNamespaceAware();
|
public boolean | isValidating()
return factory.isValidating();
|
public org.w3c.dom.Document | load(java.net.URL url)
Document doc = null;
Exception parseException = null;
try {
LoadErrorHandler errorHandler = new LoadErrorHandler();
builder.setErrorHandler(errorHandler);
doc = builder.parse(url.openStream(), url.toString());
parseException = errorHandler.getFirstException();
}
catch (Exception ex) {
parseException = ex;
}
builder.setErrorHandler(null);
if (parseException != null) {
throw new DOMTestLoadException(parseException);
}
return doc;
|
public DOMTestDocumentBuilderFactory | newInstance(DocumentBuilderSetting[] newSettings)
if (newSettings == null) {
return this;
}
DocumentBuilderSetting[] mergedSettings = mergeSettings(newSettings);
DocumentBuilderFactory newFactory = factory.newInstance();
return createInstance(newFactory, mergedSettings);
|