ASN1C C# Runtime Library  7.3
Public Member Functions | Static Public Member Functions | Protected Attributes | Properties | List of all members
XmlSaxParser Class Reference
Inheritance diagram for XmlSaxParser:
XmlSaxParserAdapter

Public Member Functions

virtual XmlSaxContentHandler GetContentHandler ()
 
virtual XmlSaxEntityResolver GetEntityResolver ()
 
virtual XmlSaxErrorHandler GetErrorHandler ()
 
virtual void Parse (System.IO.FileInfo filepath, XmlSaxContentHandler handler)
 
virtual void Parse (System.String filepath, XmlSaxContentHandler handler)
 
virtual void Parse (System.IO.Stream stream, XmlSaxContentHandler handler)
 
virtual void Parse (System.IO.Stream stream, XmlSaxContentHandler handler, System.String URI)
 
virtual void Parse (XmlSource source, XmlSaxContentHandler handler)
 
virtual void Parse (System.IO.FileInfo filepath)
 
virtual void Parse (System.String filepath)
 
virtual void Parse (System.IO.Stream stream)
 
virtual void Parse (System.IO.Stream stream, System.String URI)
 
virtual void Parse (XmlSource source)
 
virtual void SetContentHandler (XmlSaxContentHandler handler)
 
virtual void SetDocumentHandler (XmlSaxContentHandler handler)
 
virtual void SetEntityResolver (XmlSaxEntityResolver resolver)
 
virtual void SetErrorHandler (XmlSaxErrorHandler handler)
 
 XmlSaxParser ()
 

Static Public Member Functions

static XmlSaxParser CloneInstance (XmlSaxParser instance)
 
static XmlSaxParser NewInstance ()
 

Protected Attributes

XmlSaxContentHandler callBackHandler
 
XmlSaxEntityResolver entityResolver
 
XmlSaxErrorHandler errorHandler
 
XmlSaxLexicalHandler lexical
 
XmlSaxLocatorImpl locator
 
bool namespaceAllowed
 
System.String parserFileName
 
System.Xml.XmlTextReader reader
 

Properties

bool NamespaceAllowed [get, set]
 

Detailed Description

Emulates the SAX parsers behaviours.

Constructor & Destructor Documentation

◆ XmlSaxParser()

Public constructor for the class.

Member Function Documentation

◆ CloneInstance()

static XmlSaxParser CloneInstance ( XmlSaxParser  instance)
static

◆ GetContentHandler()

virtual XmlSaxContentHandler GetContentHandler ( )
virtual

Obtains the object that will handle all the content events.

Returns
The object that handles the content events.

Referenced by XmlSaxParser.CloneInstance().

◆ GetEntityResolver()

virtual XmlSaxEntityResolver GetEntityResolver ( )
virtual

Returns the current entity resolver.

Returns
The current entity resolver, or null if none has been registered.

◆ GetErrorHandler()

virtual XmlSaxErrorHandler GetErrorHandler ( )
virtual

Assigns the object that will handle all the error events.

Returns
The object that handles the error events.

Referenced by XmlSaxParser.CloneInstance().

◆ NewInstance()

static XmlSaxParser NewInstance ( )
static

Returns a new instance of 'XmlSaxParser'.

Returns
A new 'XmlSaxParser' instance.

◆ Parse() [1/10]

virtual void Parse ( System.IO.FileInfo  filepath,
XmlSaxContentHandler  handler 
)
virtual

Parses the specified file and process the events over the specified handler.

Parameters
filepathThe file to be used.
handlerThe handler that manages the parser events.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [2/10]

virtual void Parse ( System.String  filepath,
XmlSaxContentHandler  handler 
)
virtual

Parses the specified file path and process the events over the specified handler.

Parameters
filepathThe path of the file to be used.
handlerThe handler that manage the parser events.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [3/10]

virtual void Parse ( System.IO.Stream  stream,
XmlSaxContentHandler  handler 
)
virtual

Parses the specified stream and process the events over the specified handler.

Parameters
streamThe stream with the XML.
handlerThe handler that manage the parser events.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [4/10]

virtual void Parse ( System.IO.Stream  stream,
XmlSaxContentHandler  handler,
System.String  URI 
)
virtual

Parses the specified stream and process the events over the specified handler, and resolves the entities with the specified URI.

Parameters
streamThe stream with the XML.
handlerThe handler that manage the parser events.
URIThe namespace URI for resolve external etities.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [5/10]

virtual void Parse ( XmlSource  source,
XmlSaxContentHandler  handler 
)
virtual

Parses the specified 'XmlSource' instance and process the events over the specified handler, and resolves the entities with the specified URI.

Parameters
sourceThe 'XmlSource' that contains the XML.
handlerThe handler that manages the parser events.

References XmlSource.Bytes, XmlSource.Characters, and XmlSource.Uri.

◆ Parse() [6/10]

virtual void Parse ( System.IO.FileInfo  filepath)
virtual

Parses the specified file and process the events over previously specified handler.

Parameters
filepathThe file with the XML.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [7/10]

virtual void Parse ( System.String  filepath)
virtual

Parses the specified file path and processes the events over previously specified handler.

Parameters
filepathThe path of the file with the XML.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [8/10]

virtual void Parse ( System.IO.Stream  stream)
virtual

Parses the specified stream and process the events over previusly specified handler.

Parameters
streamThe stream with the XML.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [9/10]

virtual void Parse ( System.IO.Stream  stream,
System.String  URI 
)
virtual

Parses the specified stream and processes the events over previously specified handler, and resolves the external entities with the specified URI.

Parameters
streamThe stream with the XML.
URIThe namespace URI for resolve external etities.

References XmlSaxErrorHandler.FatalError().

◆ Parse() [10/10]

virtual void Parse ( XmlSource  source)
virtual

Parses the specified 'XmlSource' and processes the events over the specified handler, and resolves the entities with the specified URI.

Parameters
sourceThe 'XmlSource' instance with the XML.

References XmlSource.Bytes, XmlSource.Characters, and XmlSource.Uri.

◆ SetContentHandler()

virtual void SetContentHandler ( XmlSaxContentHandler  handler)
virtual

Assigns the object that will handle all the content events.

Parameters
handlerThe object that handles the content events.

◆ SetDocumentHandler()

virtual void SetDocumentHandler ( XmlSaxContentHandler  handler)
virtual

Assigns the object that will handle all the document events.

Parameters
handlerThe object that handles the content events.

Referenced by XmlSaxParser.CloneInstance().

◆ SetEntityResolver()

virtual void SetEntityResolver ( XmlSaxEntityResolver  resolver)
virtual

Allows an application to register an entity resolver.

Parameters
resolverThe entity resolver.

◆ SetErrorHandler()

virtual void SetErrorHandler ( XmlSaxErrorHandler  handler)
virtual

Assigns the object that will handle all the error events.

Parameters
handlerThe object that handles the errors events.

Referenced by XmlSaxParser.CloneInstance().

Member Data Documentation

◆ callBackHandler

XmlSaxContentHandler callBackHandler
protected

XmlSaxContentHandler variable manages the Content events of a XML document.

◆ entityResolver

XmlSaxEntityResolver entityResolver
protected

XmlSaxEntityResolver variable for resolving entities

◆ errorHandler

XmlSaxErrorHandler errorHandler
protected

XmlSaxErrorHandler variable manages errors during the parsing of a XML document

◆ lexical

XmlSaxLexicalHandler lexical
protected

XmlSaxLexicalHandler variable manages the Content events of a XML document

◆ locator

XmlSaxLocatorImpl locator
protected

XmlSaxLocatorImpl variable to emulates the SAX LocatorImpl behaviors.

◆ namespaceAllowed

bool namespaceAllowed
protected

Bool variable manages XML document namespace processing.

◆ parserFileName

System.String parserFileName
protected

String variable holds the XER or XML message file name

Referenced by XmlSaxParser.CloneInstance().

◆ reader

System.Xml.XmlTextReader reader
protected

XmlTextReader variable manages XML document parsing.

Property Documentation

◆ NamespaceAllowed

bool NamespaceAllowed
getset

Indicates whether the 'XmlSaxParser' allows namespaces.

Referenced by XmlSaxParser.CloneInstance().