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)
IXmlParserFactoryDocumentBuilder.createDocumentBuilderInstance in interface IXmlParserFactorynamespaceAware - specifies whether the parser should be namespace awareignoringComments - specifies whether the parser should ignore commentsDocumentBuilderpublic XMLReader createXMLReaderInstance(boolean namespaceAware, boolean validating)
IXmlParserFactoryXMLReader.createXMLReaderInstance in interface IXmlParserFactorynamespaceAware - specifies whether the parser should be namespace awarevalidating - specifies whether the parser should validate documents as they are parsedXMLReaderCopyright © 1998–2021 iText Group NV. All rights reserved.