iText 8.0.2 API
iText.Kernel.Utils.DefaultSafeXmlParserFactory Class Reference

Implementation of IXmlParserFactory for creating safe xml parser objects. More...

Inheritance diagram for iText.Kernel.Utils.DefaultSafeXmlParserFactory:
iText.Kernel.Utils.IXmlParserFactory

Public Member Functions

XmlReader  CreateXmlReaderInstance (Stream stream, XmlParserContext inputContext)
  Creates the instance of XmlReader. More...
 
XmlReader  CreateXmlReaderInstance (TextReader textReader)
  Creates the instance of XmlReader. More...
 

Protected Member Functions

virtual XmlReaderSettings  CreateSafeXmlReaderSettings ()
  Creates XmlReaderSettings to make reader secure against xml attacks. More...
 

Detailed Description

Implementation of IXmlParserFactory for creating safe xml parser objects.

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

Member Function Documentation

◆ CreateSafeXmlReaderSettings()

virtual XmlReaderSettings iText.Kernel.Utils.DefaultSafeXmlParserFactory.CreateSafeXmlReaderSettings ( )
inlineprotectedvirtual

Creates XmlReaderSettings to make reader secure against xml attacks.

Returns
Configured xml reader settings

◆ CreateXmlReaderInstance() [1/2]

XmlReader iText.Kernel.Utils.DefaultSafeXmlParserFactory.CreateXmlReaderInstance ( Stream  stream,
XmlParserContext  inputContext 
)
inline

Creates the instance of XmlReader.

Parameters
stream the stream that contains the XML data.
inputContext the context information required to parse the XML fragment.
Returns
an object that is used to read the XML data in the stream.

Implements iText.Kernel.Utils.IXmlParserFactory.

◆ CreateXmlReaderInstance() [2/2]

XmlReader iText.Kernel.Utils.DefaultSafeXmlParserFactory.CreateXmlReaderInstance ( TextReader  textReader )
inline

Creates the instance of XmlReader.

Parameters
textReader the text reader from which to read the XML data.
Returns
an object that is used to read the XML data in the stream.

Implements iText.Kernel.Utils.IXmlParserFactory.