public class DefaultSafeXmlParserFactory extends Object implements IXmlParserFactory
IXmlParserFactory
for creating safe xml parser objects. Creates parsers with configuration to prevent XML bombs and XXE attacks.
Constructor and Description |
---|
DefaultSafeXmlParserFactory()
Creates instance of DefaultSafeXmlParserFactory .
|
Modifier and Type | Method and Description |
---|---|
DocumentBuilder |
createDocumentBuilderInstance(boolean namespaceAware, boolean ignoringComments)
Creates the instance of the DocumentBuilder .
|
XMLReader |
createXMLReaderInstance(boolean namespaceAware, boolean validating)
Creates the instance of the XMLReader .
|
public DefaultSafeXmlParserFactory()
DefaultSafeXmlParserFactory
.
public DocumentBuilder createDocumentBuilderInstance(boolean namespaceAware, boolean ignoringComments)
IXmlParserFactory
DocumentBuilder
.
createDocumentBuilderInstance
in interface IXmlParserFactory
namespaceAware
- specifies whether the parser should be namespace aware
ignoringComments
- specifies whether the parser should ignore comments
DocumentBuilder
public XMLReader createXMLReaderInstance(boolean namespaceAware, boolean validating)
IXmlParserFactory
XMLReader
.
createXMLReaderInstance
in interface IXmlParserFactory
namespaceAware
- specifies whether the parser should be namespace aware
validating
- specifies whether the parser should validate documents as they are parsed
XMLReader
Copyright © 1998–2021 iText Group NV. All rights reserved.