public static final class XmlReadingProperties.Xerces extends Object
Based on revision 1872634 of the official Xerces properties documentation
If you have created a DOM document builder or a SAX parser using the JAXP interfaces, the following instructions tell you how to set properties on document builders and SAX parsers created from the JAXP interfaces.
The method
DocumentBuilderFactory.setAttribute(String, Object)
may provide a means to set properties on the underlying parser. When using
Xerces, you can set the value of a property with this method. For example:
import javax.xml.parsers.DocumentBuilderFactory; DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setNamespaceAware(true); XercesProperties.DOM.DOCUMENT_CLASS_NAME.set(documentBuilderFactory, "org.apache.xerces.dom.DocumentImpl");
The method SAXParser.setProperty(String, Object)
can be used to set properties on the underlying implementation of
XMLReader
. You can also retrieve the underlying
XMLReader
from the SAXParser
allowing you to set and query properties on it directly. For example:
import javax.xml.parsers.SAXParser; import org.xml.sax.XMLReader; SAXParser saxParser = ...; XMLReader xmlReader = saxParser.getXMLReader(); XercesProperties.INPUT_BUFFER_SIZE.set(xmlReader, 2048);
Modifier and Type | Class and Description |
---|---|
static class |
XmlReadingProperties.Xerces.DOM
DOM Properties
|
static class |
XmlReadingProperties.Xerces.General
General Properties
|
static class |
XmlReadingProperties.Xerces.SAX
SAX Properties
|
Copyright © 2025. All rights reserved.