public abstract class AbstractParserOptions extends java.lang.Object implements ParserOptions, java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
getAutodetectCharset()
Returns true if the parser should attempt to automatically detect the character encoding from the stream
|
java.lang.String |
getCharset()
Returns the default character set to use for the parsed document
|
CompressionUtil.CompressionCodec[] |
getCompressionCodecs()
When parsing an InputStream that contains compressed data, use these codecs to decompress the stream.
|
Factory |
getFactory()
Returns the factory the parser should use
|
char |
getFilterRestrictedCharacterReplacement()
If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified character
|
boolean |
getFilterRestrictedCharacters()
If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document.
|
boolean |
getMustPreserveWhitespace()
If false, the parser will trim leading and trailing whitespace in element and attribute values unless there is an
in-scope xml:space="preserve".
|
ParseFilter |
getParseFilter()
Returns the Parse Filter.
|
java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> |
getQNameAliasMap()
Get the QName-Alias Mapping (default null)
|
boolean |
getResolveEntities()
True if undeclared named entities should be resolved.
|
boolean |
isQNameAliasMappingEnabled()
True if QName-Alias mapping is enabled (default is false)
|
ParserOptions |
registerEntity(java.lang.String name,
java.lang.String value)
Register a named entity.
|
java.lang.String |
resolveEntity(java.lang.String name)
Resolves a value for a named entity.
|
ParserOptions |
setAutodetectCharset(boolean detect)
If true, the parser will attempt to automatically detect the character encoding from the stream by checking for
the byte order mark or checking the XML prolog.
|
ParserOptions |
setCharset(java.lang.String charset)
Sets the character set to use for the parsed document
|
ParserOptions |
setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
When parsing an InputStream that contains compressed data, use these codecs to decompress the stream.
|
ParserOptions |
setFactory(Factory factory)
Sets the factory the parser should use
|
ParserOptions |
setFilterRestrictedCharacterReplacement(char replacement)
If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified character
|
ParserOptions |
setFilterRestrictedCharacters(boolean filter)
If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document
|
ParserOptions |
setMustPreserveWhitespace(boolean preserve)
If false, the parser will trim leading and trailing whitespace in element and attribute values unless there is an
in-scope xml:space="preserve".
|
ParserOptions |
setParseFilter(ParseFilter parseFilter)
Sets the Parse Filter.
|
ParserOptions |
setQNameAliasMap(java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> map)
Set the QName-Alias Mapping
|
ParserOptions |
setQNameAliasMappingEnabled(boolean enabled)
True if QName-Alias mapping is enabled
|
ParserOptions |
setResolveEntities(boolean resolve)
True if undeclared named entities should be resolved.
|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface ParserOptions
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public Factory getFactory()
ParserOptions
getFactory
in interface ParserOptions
public ParserOptions setFactory(Factory factory)
ParserOptions
setFactory
in interface ParserOptions
public java.lang.String getCharset()
ParserOptions
getCharset
in interface ParserOptions
public ParserOptions setCharset(java.lang.String charset)
ParserOptions
setCharset
in interface ParserOptions
public ParseFilter getParseFilter()
ParserOptions
getParseFilter
in interface ParserOptions
public ParserOptions setParseFilter(ParseFilter parseFilter)
ParserOptions
setParseFilter
in interface ParserOptions
public boolean getAutodetectCharset()
ParserOptions
getAutodetectCharset
in interface ParserOptions
public ParserOptions setAutodetectCharset(boolean detect)
ParserOptions
setAutodetectCharset
in interface ParserOptions
public boolean getMustPreserveWhitespace()
ParserOptions
getMustPreserveWhitespace
in interface ParserOptions
public ParserOptions setMustPreserveWhitespace(boolean preserve)
ParserOptions
setMustPreserveWhitespace
in interface ParserOptions
public boolean getFilterRestrictedCharacters()
ParserOptions
getFilterRestrictedCharacters
in interface ParserOptions
public ParserOptions setFilterRestrictedCharacters(boolean filter)
ParserOptions
setFilterRestrictedCharacters
in interface ParserOptions
public char getFilterRestrictedCharacterReplacement()
ParserOptions
getFilterRestrictedCharacterReplacement
in interface ParserOptions
public ParserOptions setFilterRestrictedCharacterReplacement(char replacement)
ParserOptions
setFilterRestrictedCharacterReplacement
in interface ParserOptions
public CompressionUtil.CompressionCodec[] getCompressionCodecs()
ParserOptions
getCompressionCodecs
in interface ParserOptions
public ParserOptions setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
ParserOptions
setCompressionCodecs
in interface ParserOptions
public ParserOptions registerEntity(java.lang.String name, java.lang.String value)
ParserOptions
registerEntity
in interface ParserOptions
public java.lang.String resolveEntity(java.lang.String name)
ParserOptions
resolveEntity
in interface ParserOptions
public ParserOptions setResolveEntities(boolean resolve)
ParserOptions
setResolveEntities
in interface ParserOptions
public boolean getResolveEntities()
ParserOptions
getResolveEntities
in interface ParserOptions
public java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> getQNameAliasMap()
ParserOptions
getQNameAliasMap
in interface ParserOptions
public ParserOptions setQNameAliasMap(java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> map)
ParserOptions
setQNameAliasMap
in interface ParserOptions
public boolean isQNameAliasMappingEnabled()
ParserOptions
isQNameAliasMappingEnabled
in interface ParserOptions
public ParserOptions setQNameAliasMappingEnabled(boolean enabled)
ParserOptions
setQNameAliasMappingEnabled
in interface ParserOptions
Copyright © 2010 - 2023 Adobe. All Rights Reserved