com.sun.xml.bind.v2.util
Class XmlFactory

java.lang.Object
  extended by com.sun.xml.bind.v2.util.XmlFactory

public class XmlFactory
extends Object

Provides helper methods for creating properly configured XML parser factory instances with namespace support turned on and configured for security.

Author:
snajper

Field Summary
static boolean DISABLE_SECURE_PROCESSING
           
static Logger logger
           
 
Constructor Summary
XmlFactory()
           
 
Method Summary
static DocumentBuilderFactory createDocumentBuilderFactory(boolean disableSecureProcessing)
          Returns properly configured (e.g.
static SAXParserFactory createParserFactory(boolean disableSecureProcessing)
          Returns properly configured (e.g.
static SchemaFactory createSchemaFactory(String language, boolean disableSecureProcessing)
          Returns properly configured (e.g.
static TransformerFactory createTransformerFactory(boolean disableSecureProcessing)
          Returns properly configured (e.g.
static XPathFactory createXPathFactory(boolean disableSecureProcessing)
          Returns properly configured (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final Logger logger

DISABLE_SECURE_PROCESSING

public static final boolean DISABLE_SECURE_PROCESSING
Constructor Detail

XmlFactory

public XmlFactory()
Method Detail

createSchemaFactory

public static final SchemaFactory createSchemaFactory(String language,
                                                      boolean disableSecureProcessing)
                                               throws IllegalArgumentException
Returns properly configured (e.g. security features) schema factory - namespaceAware == true - securityProcessing == is set based on security processing property, default is true

Throws:
IllegalArgumentException

createParserFactory

public static final SAXParserFactory createParserFactory(boolean disableSecureProcessing)
                                                  throws IllegalArgumentException
Returns properly configured (e.g. security features) parser factory - namespaceAware == true - securityProcessing == is set based on security processing property, default is true

Throws:
IllegalArgumentException

createXPathFactory

public static final XPathFactory createXPathFactory(boolean disableSecureProcessing)
                                             throws IllegalArgumentException
Returns properly configured (e.g. security features) factory - securityProcessing == is set based on security processing property, default is true

Throws:
IllegalArgumentException

createTransformerFactory

public static final TransformerFactory createTransformerFactory(boolean disableSecureProcessing)
                                                         throws IllegalArgumentException
Returns properly configured (e.g. security features) factory - securityProcessing == is set based on security processing property, default is true

Throws:
IllegalArgumentException

createDocumentBuilderFactory

public static final DocumentBuilderFactory createDocumentBuilderFactory(boolean disableSecureProcessing)
                                                                 throws IllegalStateException
Returns properly configured (e.g. security features) factory - namespaceAware == true - securityProcessing == is set based on security processing property, default is true

Throws:
IllegalStateException


Copyright © 2005-2012 Oracle Corporation. All Rights Reserved.