public class XMLEventParserContextFactory extends Object
| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | XMLEventParserContextFactory.ParserTableEntryHolds the mime types and the associated prototype parser. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected static List<XMLEventParserContextFactory.ParserTableEntry> | parsersThe list of registered parser contexts. | 
| Constructor and Description | 
|---|
| XMLEventParserContextFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | addParserContext(String[] mimeTypes,
                XMLEventParserContext prototypeContext)Appends a specified prototype parser context to the list of those already registered. | 
| protected static XMLEventParserContext | createInstanceFromPrototype(XMLEventParserContext prototype)Constructs a new parser context given a prototype parser context. | 
| static XMLEventParserContext | createParserContext(String mimeType,
                   String defaultNamespace)Constructs and returns a parser context for a specified mime type and namespace. | 
| static void | prependParserContext(String[] mimeTypes,
                    XMLEventParserContext prototypeContext)Prepends a specified prototype parser context to the list of those already registered. | 
protected static List<XMLEventParserContextFactory.ParserTableEntry> parsers
public static void addParserContext(String[] mimeTypes, XMLEventParserContext prototypeContext)
mimeTypes - the list of mime types for which to use the specified prototype parser context.prototypeContext - the prototype parser context to use for the specified mime types. This parser context's
                         class must provide a copy constructor, a constructor that takes an instance of its class
                         as its only argument.IllegalArgumentException - if the mime type list is null or empty or the prototype context is null or has
                                  no copy constructor.protected static XMLEventParserContext createInstanceFromPrototype(XMLEventParserContext prototype) throws Exception
prototype - the prototype parser context. This parser context's class must provide a copy constructor, a
                  constructor that takes an instance of the class as its only argument.Exception - if an exception occurs while attempting to construct the new context.public static XMLEventParserContext createParserContext(String mimeType, String defaultNamespace)
XMLConstants.NULL_NS_URI does not match any other namespace. In order for
 a parser context with the empty namespace to be returned, one with the empty namespace must be registered.mimeType - the mime type for which to construct a parser.defaultNamespace - a namespace qualifying the parser context to return. May be null, in which case a parser
                         context for the specified mime type and an empty namespace, XMLConstants.NULL_NS_URI, is searched for.IllegalArgumentException - if the specified mime type is null.public static void prependParserContext(String[] mimeTypes, XMLEventParserContext prototypeContext)
mimeTypes - the list of mime types for which to use the specified prototype parser context.prototypeContext - the prototype parser context to use for the specified mime types. This parser context's
                         class must provide a copy constructor, a constructor that takes an instance of its class
                         as its only argument.IllegalArgumentException - if the mime type list is null or empty or the prototype context is null or has
                                  no copy constructor.