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 ParserOptionsclone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic Factory getFactory()
ParserOptionsgetFactory in interface ParserOptionspublic ParserOptions setFactory(Factory factory)
ParserOptionssetFactory in interface ParserOptionspublic java.lang.String getCharset()
ParserOptionsgetCharset in interface ParserOptionspublic ParserOptions setCharset(java.lang.String charset)
ParserOptionssetCharset in interface ParserOptionspublic ParseFilter getParseFilter()
ParserOptionsgetParseFilter in interface ParserOptionspublic ParserOptions setParseFilter(ParseFilter parseFilter)
ParserOptionssetParseFilter in interface ParserOptionspublic boolean getAutodetectCharset()
ParserOptionsgetAutodetectCharset in interface ParserOptionspublic ParserOptions setAutodetectCharset(boolean detect)
ParserOptionssetAutodetectCharset in interface ParserOptionspublic boolean getMustPreserveWhitespace()
ParserOptionsgetMustPreserveWhitespace in interface ParserOptionspublic ParserOptions setMustPreserveWhitespace(boolean preserve)
ParserOptionssetMustPreserveWhitespace in interface ParserOptionspublic boolean getFilterRestrictedCharacters()
ParserOptionsgetFilterRestrictedCharacters in interface ParserOptionspublic ParserOptions setFilterRestrictedCharacters(boolean filter)
ParserOptionssetFilterRestrictedCharacters in interface ParserOptionspublic char getFilterRestrictedCharacterReplacement()
ParserOptionsgetFilterRestrictedCharacterReplacement in interface ParserOptionspublic ParserOptions setFilterRestrictedCharacterReplacement(char replacement)
ParserOptionssetFilterRestrictedCharacterReplacement in interface ParserOptionspublic CompressionUtil.CompressionCodec[] getCompressionCodecs()
ParserOptionsgetCompressionCodecs in interface ParserOptionspublic ParserOptions setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
ParserOptionssetCompressionCodecs in interface ParserOptionspublic ParserOptions registerEntity(java.lang.String name, java.lang.String value)
ParserOptionsregisterEntity in interface ParserOptionspublic java.lang.String resolveEntity(java.lang.String name)
ParserOptionsresolveEntity in interface ParserOptionspublic ParserOptions setResolveEntities(boolean resolve)
ParserOptionssetResolveEntities in interface ParserOptionspublic boolean getResolveEntities()
ParserOptionsgetResolveEntities in interface ParserOptionspublic java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> getQNameAliasMap()
ParserOptionsgetQNameAliasMap in interface ParserOptionspublic ParserOptions setQNameAliasMap(java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> map)
ParserOptionssetQNameAliasMap in interface ParserOptionspublic boolean isQNameAliasMappingEnabled()
ParserOptionsisQNameAliasMappingEnabled in interface ParserOptionspublic ParserOptions setQNameAliasMappingEnabled(boolean enabled)
ParserOptionssetQNameAliasMappingEnabled in interface ParserOptionsCopyright © 2010 - 2023 Adobe. All Rights Reserved