This class will create only a single factory instance.
Modifier and Type | Field and Description |
---|---|
private static DocumentBuilderFactory | builderFactory
Parser factory to use to create document builders. |
private static final FileUtils | FILE_UTILS
Helper for systemId. |
private static SAXParserFactory | nsParserFactory
Parser Factory to create Namespace aware parsers. |
private static SAXParserFactory | parserFactory
Parser factory to use to create parsers. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private static BuildException | |
public static DocumentBuilder | |
private static synchronized DocumentBuilderFactory | |
public static XMLReader | Returns: a SAX 2 XMLReader.Returns a newly created SAX 2 XMLReader, which is namespace aware |
public static synchronized SAXParserFactory | Returns: a SAXParserFactory to use which supports manufacture of namespace aware parsers.Returns the parser factory to use to create namespace aware parsers. |
public static Parser | |
public static synchronized SAXParserFactory | |
public static String | Returns: the systemid corresponding to the given file.the file to create the system id from. file)This is a best attempt to provide a URL.toExternalForm() from a file URL. |
public static XMLReader | Returns: a SAX 2 XMLReader.Returns a newly created SAX 2 XMLReader, using the default parser factory. |
public static SAXParserFactory | |
private static SAXParser | Returns: a new SAXParser instance as helper for getParser and getXMLReader.
|
builderFactory | back to summary |
---|---|
private static DocumentBuilderFactory builderFactory Parser factory to use to create document builders.
|
FILE_UTILS | back to summary |
---|---|
private static final FileUtils FILE_UTILS Helper for systemId.
|
nsParserFactory | back to summary |
---|---|
private static SAXParserFactory nsParserFactory Parser Factory to create Namespace aware parsers.
|
parserFactory | back to summary |
---|---|
private static SAXParserFactory parserFactory Parser factory to use to create parsers.
|
JAXPUtils | back to summary |
---|---|
public JAXPUtils() |
convertToBuildException | back to summary |
---|---|
private static BuildException convertToBuildException(SAXException e) Translate a SAXException into a BuildException
|
getDocumentBuilder | back to summary |
---|---|
public static DocumentBuilder getDocumentBuilder() throws BuildException Returns a newly created DocumentBuilder.
|
getDocumentBuilderFactory | back to summary |
---|---|
private static synchronized DocumentBuilderFactory getDocumentBuilderFactory() throws BuildException Obtains the default builder factory if not already.
|
getNamespaceXMLReader | back to summary |
---|---|
public static XMLReader getNamespaceXMLReader() throws BuildException Returns a newly created SAX 2 XMLReader, which is namespace aware
|
getNSParserFactory | back to summary |
---|---|
public static synchronized SAXParserFactory getNSParserFactory() throws BuildException Returns the parser factory to use to create namespace aware parsers.
|
getParser | back to summary |
---|---|
public static Parser getParser() throws BuildException
Deprecated as a consequence of Returns a newly created SAX 1 Parser, using the default parser factory.
|
getParserFactory | back to summary |
---|---|
public static synchronized SAXParserFactory getParserFactory() throws BuildException Returns the parser factory to use. Only one parser factory is ever created by this method and is then cached for future use.
|
getSystemId | back to summary |
---|---|
public static String getSystemId(File file) This is a best attempt to provide a URL.toExternalForm() from a file URL. Some parsers like Crimson choke on uri that are made of backslashed paths (ie windows) as it is does not conform URI specifications. |
getXMLReader | back to summary |
---|---|
public static XMLReader getXMLReader() throws BuildException Returns a newly created SAX 2 XMLReader, using the default parser factory.
|
newParserFactory | back to summary |
---|---|
public static SAXParserFactory newParserFactory() throws BuildException Returns a new parser factory instance.
|
newSAXParser | back to summary |
---|---|
private static SAXParser newSAXParser(SAXParserFactory factory) throws BuildException
|