Class ApacheSantuarioXMLParser
java.lang.Object
org.opensaml.xmlsec.impl.provider.ApacheSantuarioXMLParser
- All Implemented Interfaces:
org.apache.xml.security.parser.XMLParser
public class ApacheSantuarioXMLParser
extends Object
implements org.apache.xml.security.parser.XMLParser
Implementation of Santuario's
XMLParser which simply wraps an instance of ParserPool.
Note:
- This class is required to have a no-arg constructor.
- It will fail on any calls where
disallowDocTypeDeclarations=false. - It is configured into Santuario by setting the class name using system
property
org.apache.xml.security.XMLParser. For details see:XMLUtils. - By default it internally uses the registered global
ParserPoolfrom theConfigurationService, if available. If not, then it constructs an internal instance ofBasicParserPool. - The internal parser pool's max pool size may be configured via OpenSAML
ConfigurationServiceproperty. The default is: 50CONFIG_PROPERTY_MAX_POOL_SIZE
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfig property for internal pool's maxPoolSize.private final org.slf4j.LoggerLogger.private final ParserPoolWrapped instance ofParserPool. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(InputStream inputStream, boolean disallowDocTypeDeclarations)
-
Field Details
-
CONFIG_PROPERTY_MAX_POOL_SIZE
Config property for internal pool's maxPoolSize.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
parserPool
Wrapped instance ofParserPool.
-
-
Constructor Details
-
ApacheSantuarioXMLParser
Constructor.- Throws:
InitializationException- if the internalBasicParserPoolcan not be initialized successfully
-
-
Method Details
-
parse
public Document parse(InputStream inputStream, boolean disallowDocTypeDeclarations) throws org.apache.xml.security.parser.XMLParserException - Specified by:
parsein interfaceorg.apache.xml.security.parser.XMLParser- Throws:
org.apache.xml.security.parser.XMLParserException
-