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 String ACCESS_EXTERNAL_DTD
           
static String ACCESS_EXTERNAL_SCHEMA
           
static boolean XML_SECURITY_DISABLED
           
 
Constructor Summary
XmlFactory()
           
 
Method Summary
static SchemaFactory allowExternalAccess(SchemaFactory sf, String value, boolean disableSecureProcessing)
           
static SchemaFactory allowExternalDTDAccess(SchemaFactory sf, String value, boolean disableSecureProcessing)
           
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

ACCESS_EXTERNAL_SCHEMA

public static final String ACCESS_EXTERNAL_SCHEMA
See Also:
Constant Field Values

ACCESS_EXTERNAL_DTD

public static final String ACCESS_EXTERNAL_DTD
See Also:
Constant Field Values

XML_SECURITY_DISABLED

public static final boolean XML_SECURITY_DISABLED
Constructor Detail

XmlFactory

public XmlFactory()
Method Detail

createSchemaFactory

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

Throws:
IllegalStateException

createParserFactory

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

Throws:
IllegalStateException

createXPathFactory

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

Throws:
IllegalStateException

createTransformerFactory

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

Throws:
IllegalStateException

createDocumentBuilderFactory

public static 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

allowExternalAccess

public static SchemaFactory allowExternalAccess(SchemaFactory sf,
                                                String value,
                                                boolean disableSecureProcessing)

allowExternalDTDAccess

public static SchemaFactory allowExternalDTDAccess(SchemaFactory sf,
                                                   String value,
                                                   boolean disableSecureProcessing)


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