📄 qxmlreader.3qt
字号:
'\" t.TH QXmlReader 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQXmlReader \- Interface for XML readers (i.e. parsers).SH SYNOPSIS\fC#include <qxml.h>\fR.PPInherited by QXmlSimpleReader..PP.SS "Public Members".in +1c.ti -1c.BI "virtual bool \fBfeature\fR ( const QString & name, bool * ok = 0 ) const = 0".br.ti -1c.BI "virtual void \fBsetFeature\fR ( const QString & name, bool value ) = 0".br.ti -1c.BI "virtual bool \fBhasFeature\fR ( const QString & name ) const = 0".br.ti -1c.BI "virtual void * \fBproperty\fR ( const QString & name, bool * ok = 0 ) const = 0".br.ti -1c.BI "virtual void \fBsetProperty\fR ( const QString & name, void * value ) = 0".br.ti -1c.BI "virtual bool \fBhasProperty\fR ( const QString & name ) const = 0".br.ti -1c.BI "virtual void \fBsetEntityResolver\fR ( QXmlEntityResolver * handler ) = 0".br.ti -1c.BI "virtual QXmlEntityResolver * \fBentityResolver\fR () const = 0".br.ti -1c.BI "virtual void \fBsetDTDHandler\fR ( QXmlDTDHandler * handler ) = 0".br.ti -1c.BI "virtual QXmlDTDHandler * \fBDTDHandler\fR () const = 0".br.ti -1c.BI "virtual void \fBsetContentHandler\fR ( QXmlContentHandler * handler ) = 0".br.ti -1c.BI "virtual QXmlContentHandler * \fBcontentHandler\fR () const = 0".br.ti -1c.BI "virtual void \fBsetErrorHandler\fR ( QXmlErrorHandler * handler ) = 0".br.ti -1c.BI "virtual QXmlErrorHandler * \fBerrorHandler\fR () const = 0".br.ti -1c.BI "virtual void \fBsetLexicalHandler\fR ( QXmlLexicalHandler * handler ) = 0".br.ti -1c.BI "virtual QXmlLexicalHandler * \fBlexicalHandler\fR () const = 0".br.ti -1c.BI "virtual void \fBsetDeclHandler\fR ( QXmlDeclHandler * handler ) = 0".br.ti -1c.BI "virtual QXmlDeclHandler * \fBdeclHandler\fR () const = 0".br.ti -1c.BI "virtual bool parse ( const QXmlInputSource & input ) = 0 \fI(obsolete)\fR".br.ti -1c.BI "virtual bool \fBparse\fR ( const QXmlInputSource * input ) = 0".br.in -1c.SH DESCRIPTIONThe QXmlReader class provides an interface for XML readers (i.e. parsers)..PPThis abstract class provides an interface for all 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)..PPThe 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..PPAll 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..PPSince the handler classes only describe interfaces you must implement all functions. We provide the QXmlDefaultHandler class to make this easier: it implements a default behaviour (do nothing) for all functions, so you can subclass it and just implement the functions you are interested in..PPFeatures 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()..PPSee also QXmlSimpleReader and XML..SH MEMBER FUNCTION DOCUMENTATION.SH "QXmlDTDHandler * QXmlReader::DTDHandler () const\fC [pure virtual]\fR"Returns the DTD handler or 0 if none was set..PPSee also setDTDHandler()..SH "QXmlContentHandler * QXmlReader::contentHandler () const\fC [pure virtual]\fR"Returns the content handler or 0 if none was set..PPSee also setContentHandler()..SH "QXmlDeclHandler * QXmlReader::declHandler () const\fC [pure virtual]\fR"Returns the declaration handler or 0 if none was set..PPSee also setDeclHandler()..SH "QXmlEntityResolver * QXmlReader::entityResolver () const\fC [pure virtual]\fR"Returns the entity resolver or 0 if none was set..PPSee also setEntityResolver()..SH "QXmlErrorHandler * QXmlReader::errorHandler () const\fC [pure virtual]\fR"Returns the error handler or 0 if none was set..PPSee also setErrorHandler()..SH "bool QXmlReader::feature ( const QString & name, bool * ok = 0 ) const\fC [pure virtual]\fR"If the reader has the feature called \fIname\fR, the feature's value is returned. If no such feature exists the return value is undefined..PPIf \fIok\fR is not 0: \fI*ok\fR is set to TRUE if the reader has the feature called \fIname\fR; otherwise \fI*ok\fR is set to FALSE..PPSee also setFeature() and hasFeature()..SH "bool QXmlReader::hasFeature ( const QString & name ) const\fC [pure virtual]\fR"Returns \fCTRUE\fR if the reader has the feature called \fIname\fR; otherwise returns FALSE..PPSee also feature() and setFeature()..SH "bool QXmlReader::hasProperty ( const QString & name ) const\fC [pure virtual]\fR"Returns TRUE if the reader has the property \fIname\fR; otherwise returns FALSE..PPSee also property() and setProperty()..SH "QXmlLexicalHandler * QXmlReader::lexicalHandler () const\fC [pure virtual]\fR"Returns the lexical handler or 0 if none was set..PPSee also setLexicalHandler()..SH "bool QXmlReader::parse ( const QXmlInputSource * input )\fC [pure virtual]\fR"Reads an XML document from \fIinput\fR and parses it. Returns TRUE if the parsing was successful; otherwise returns FALSE..PPExample: xml/tagreader/tagreader.cpp..SH "bool QXmlReader::parse ( const QXmlInputSource & input )\fC [pure virtual]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void * QXmlReader::property ( const QString & name, bool * ok = 0 ) const\fC [pure virtual]\fR"If the reader has the property \fIname\fR, this function returns the value of the property; otherwise the return value is undefined..PPIf \fIok\fR is not 0: if the reader has the \fIname\fR property \fI*ok\fR is set to TRUE; otherwise \fI*ok\fR is set to FALSE..PPSee also setProperty() and hasProperty()..SH "void QXmlReader::setContentHandler ( QXmlContentHandler * handler )\fC [pure virtual]\fR"Sets the content handler to \fIhandler\fR..PPSee also contentHandler()..PPExample: xml/tagreader/tagreader.cpp..SH "void QXmlReader::setDTDHandler ( QXmlDTDHandler * handler )\fC [pure virtual]\fR"Sets the DTD handler to \fIhandler\fR..PPSee also DTDHandler()..SH "void QXmlReader::setDeclHandler ( QXmlDeclHandler * handler )\fC [pure virtual]\fR"Sets the declaration handler to \fIhandler\fR..PPSee also declHandler()..SH "void QXmlReader::setEntityResolver ( QXmlEntityResolver * handler )\fC [pure virtual]\fR"Sets the entity resolver to \fIhandler\fR..PPSee also entityResolver()..SH "void QXmlReader::setErrorHandler ( QXmlErrorHandler * handler )\fC [pure virtual]\fR"Sets the error handler to \fIhandler\fR. Clears the error handler if \fIhandler\fR is 0..PPSee also errorHandler()..SH "void QXmlReader::setFeature ( const QString & name, bool value )\fC [pure virtual]\fR"Sets the feature called \fIname\fR to the given \fIvalue\fR. If the reader doesn't have the feature nothing happens..PPSee also feature() and hasFeature()..SH "void QXmlReader::setLexicalHandler ( QXmlLexicalHandler * handler )\fC [pure virtual]\fR"Sets the lexical handler to \fIhandler\fR..PPSee also lexicalHandler()..SH "void QXmlReader::setProperty ( const QString & name, void * value )\fC [pure virtual]\fR"Sets the property \fIname\fR to \fIvalue\fR. If the reader doesn't have the property nothing happens..PPSee also property() and hasProperty()..SH "SEE ALSO".BR http://doc.trolltech.com/qxmlreader.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qxmlreader.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -