Table of Contents

Class DefaultSafeXmlParserFactory

Namespace
iText.Kernel.Utils
Assembly
itext.kernel.dll

Implementation of IXmlParserFactory for creating safe xml parser objects.

public class DefaultSafeXmlParserFactory : IXmlParserFactory
Inheritance
DefaultSafeXmlParserFactory
Implements
Inherited Members

Remarks

Implementation of IXmlParserFactory for creating safe xml parser objects. Creates parsers with configuration to prevent xml bombs and xxe attacks.

Constructors

DefaultSafeXmlParserFactory()

public DefaultSafeXmlParserFactory()

Methods

CreateSafeXmlReaderSettings()

Creates System.Xml.XmlReaderSettings to make reader secure against xml attacks.

protected virtual XmlReaderSettings CreateSafeXmlReaderSettings()

Returns

XmlReaderSettings

Configured xml reader settings

CreateXmlReaderInstance(Stream, XmlParserContext)

public XmlReader CreateXmlReaderInstance(Stream stream, XmlParserContext inputContext)

Parameters

stream Stream
inputContext XmlParserContext

Returns

XmlReader

CreateXmlReaderInstance(TextReader)

public XmlReader CreateXmlReaderInstance(TextReader textReader)

Parameters

textReader TextReader

Returns

XmlReader