org.apache.soap.util.xml
Class XMLParserUtils
java.lang.Object
|
+--org.apache.soap.util.xml.XMLParserUtils
- public class XMLParserUtils
- extends java.lang.Object
XML Parser Utilities Provides methods to set and use JAXP compatible XML parsers.
- Author:
- Ruth Bergman (ruth@alum.mit.edu), Matthew J. Duftler (duftler@us.ibm.com)
Method Summary |
static javax.xml.parsers.DocumentBuilder |
getXMLDocBuilder()
Use this method to get a JAXP document builder. |
static void |
refreshDocumentBuilderFactory(java.lang.String factoryClassName, boolean namespaceAware, boolean validating)
Causes the private DocumentBuilderFactory reference to point to a new instance of a DocumentBuilderFactory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLParserUtils
public XMLParserUtils()
refreshDocumentBuilderFactory
public static void refreshDocumentBuilderFactory(java.lang.String factoryClassName,
boolean namespaceAware,
boolean validating)
- Causes the private DocumentBuilderFactory reference to point to a new instance of a DocumentBuilderFactory. This method only needs to be called if you want to specify a different DocumentBuilderFactory implementation then that specified prior to this class being initialized. Or, if you want to specify different configuration options.
-
- Parameters:
factoryClassName
- the fully-qualified name of a class that implemements DocumentBuilderFactory. If this argument is null, the default (platform-specific) implementation is used. Basically, if this argument is not null, the javax.xml.parsers.DocumentBuilderFactory system property is set (with the specified value) before the DocumentBuilderFactory.newInstance() method is invoked.
namespaceAware
- configure the new DocumentBuilderFactory to produce namespace aware parsers (i.e. DocumentBuilders)
validating
- configure the new DocumentBuilderFactory to produce validating parsers (i.e. DocumentBuilders)
getXMLDocBuilder
public static javax.xml.parsers.DocumentBuilder getXMLDocBuilder()
throws java.lang.IllegalArgumentException
- Use this method to get a JAXP document builder. This method creates a namespace aware, nonvalidating instance of the XML parser.
-
- Returns:
- DocumentBuilder an instance of a document builder, or null if a ParserConfigurationException was thrown.
Copyright © 2001 Oracle SOAP. All Rights Reserved.