Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtXml.QXmlReader Class Referenceabstract

The QXmlReader class provides an interface for XML readers (i.e. parsers). More...

Inheritance diagram for QtXml.QXmlReader:
Collaboration diagram for QtXml.QXmlReader:

Public Member Functions

 QXmlReader ()
 
 QXmlReader (QXmlReader copy)
 
virtual void CreateProxy ()
 
new bool Feature (string name)
 
 
abstract bool Feature (string name, ref bool ok)
 
 
abstract bool HasFeature (string name)
 
 
abstract bool HasProperty (string name)
 
 
abstract bool Parse (QXmlInputSource input)
 
 
abstract void SetFeature (string name, bool value)
 
 
new void Dispose ()
 

Protected Member Functions

 QXmlReader (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

abstract QXmlContentHandler ContentHandler [get, set]
 
 
abstract IQXmlDTDHandler DTDHandler [get, set]
 
 
abstract IQXmlDeclHandler DeclHandler [get, set]
 
 
abstract IQXmlEntityResolver EntityResolver [get, set]
 
 
abstract IQXmlErrorHandler ErrorHandler [get, set]
 
 
abstract IQXmlLexicalHandler LexicalHandler [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QXmlReader class provides an interface for XML readers (i.e. parsers).

This abstract class provides an interface for all of Qt's XML readers. Currently there is only one implementation of a reader included in Qt's XML module: QXmlSimpleReader. In future releases there might be more readers with different properties available (e.g. a validating parser).

The design of the XML classes follows the SAX2 Java interface, with the names adapted to fit Qt naming conventions. It should be very easy for anybody who has worked with SAX2 to get started with the Qt XML classes.

All readers use the class QXmlInputSource to read the input document. Since you are normally interested in particular content in the XML document, the reader reports the content through special handler classes (QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler and QXmlLexicalHandler), which you must subclass, if you want to process the contents.

Since the handler classes only describe interfaces you must implement all the functions. We provide the QXmlDefaultHandler class to make this easier: it implements a default behavior (do nothing) for all functions, so you can subclass it and just implement the functions you are interested in.

Features and properties of the reader can be set with setFeature() and setProperty() respectively. You can set the reader to use your own subclasses with setEntityResolver(), setDTDHandler(), setContentHandler(), setErrorHandler(), setLexicalHandler() and setDeclHandler(). The parse itself is started with a call to parse().

See also QXmlSimpleReader.

Constructor & Destructor Documentation

QtXml.QXmlReader.QXmlReader ( System.Type  dummy)
protected
QtXml.QXmlReader.QXmlReader ( )
QtXml.QXmlReader.QXmlReader ( QXmlReader  copy)

Member Function Documentation

virtual void QtXml.QXmlReader.CreateProxy ( )
virtual

Reimplemented in QtXml.QXmlSimpleReader.

new void QtXml.QXmlReader.Dispose ( )
new bool QtXml.QXmlReader.Feature ( string  name)

If the reader has the feature called name, the feature's value is returned. If no such feature exists the return value is undefined.

If ok is not 0: *ok is set to true if the reader has the feature called name; otherwise *ok is set to false.

See also setFeature() and hasFeature().

abstract bool QtXml.QXmlReader.Feature ( string  name,
ref bool  ok 
)
pure virtual

If the reader has the feature called name, the feature's value is returned. If no such feature exists the return value is undefined.

If ok is not 0: *ok is set to true if the reader has the feature called name; otherwise *ok is set to false.

See also setFeature() and hasFeature().

Implemented in QtXml.QXmlSimpleReader.

abstract bool QtXml.QXmlReader.HasFeature ( string  name)
pure virtual

Returns true if the reader has the feature called name; otherwise returns false.

See also feature() and setFeature().

Implemented in QtXml.QXmlSimpleReader.

abstract bool QtXml.QXmlReader.HasProperty ( string  name)
pure virtual

Returns true if the reader has the property name; otherwise returns false.

See also property() and setProperty().

Implemented in QtXml.QXmlSimpleReader.

abstract bool QtXml.QXmlReader.Parse ( QXmlInputSource  input)
pure virtual

Reads an XML document from input and parses it. Returns true if the parsing was successful; otherwise returns false.

Implemented in QtXml.QXmlSimpleReader.

abstract void QtXml.QXmlReader.SetFeature ( string  name,
bool  value 
)
pure virtual

Sets the feature called name to the given value. If the reader doesn't have the feature nothing happens.

See also feature() and hasFeature().

Implemented in QtXml.QXmlSimpleReader.

Member Data Documentation

SmokeInvocation QtXml.QXmlReader.interceptor
protected

Property Documentation

abstract QXmlContentHandler QtXml.QXmlReader.ContentHandler
getset

Returns the content handler or 0 if none was set.

Sets the content handler to handler.

abstract IQXmlDeclHandler QtXml.QXmlReader.DeclHandler
getset

Returns the declaration handler or 0 if none was set.

Sets the declaration handler to handler.

abstract IQXmlDTDHandler QtXml.QXmlReader.DTDHandler
getset

Returns the DTD handler or 0 if none was set.

Sets the DTD handler to handler.

abstract IQXmlEntityResolver QtXml.QXmlReader.EntityResolver
getset

Returns the entity resolver or 0 if none was set.

Sets the entity resolver to handler.

abstract IQXmlErrorHandler QtXml.QXmlReader.ErrorHandler
getset

Returns the error handler or 0 if none is set.

Sets the error handler to handler. Clears the error handler if handler is 0.

abstract IQXmlLexicalHandler QtXml.QXmlReader.LexicalHandler
getset

Returns the lexical handler or 0 if none was set.

Sets the lexical handler to handler.

virtual System.IntPtr QtXml.QXmlReader.SmokeObject
getset