QXmlDeclHandler(3qt)
β¨ NAME β¨
QXmlDeclHandler β the interface that reports the declaration content of XML data π (yes bestie, declarations specifically, we'll get to it)
πΈ SYNOPSIS πΈ
Okay so first things first, the iconic disclaimer:
All the functions in this class are reentrant when Qt is built with
thread support.</p>
Then you pull it in with:
#include <qxml.h>
Inherited by QXmlDefaultHandler. π
π Public Members
virtual bool attributeDecl ( const QString & eName, const QString & aName, const QString & type, const QString & valueDefault, const QString & value ) = 0virtual bool internalEntityDecl ( const QString & name, const QString & value ) = 0virtual bool externalEntityDecl ( const QString & name, const QString & publicId, const QString & systemId ) = 0virtual QString errorString () = 0
π¦ DESCRIPTION π¦
So the QXmlDeclHandler class provides an interface to report declaration content of XML data. That's literally its whole job and it does it gorgeously. β¨
You can set the declaration handler with QXmlReader::setDeclHandler(). That's the plug-in moment, that's how you get it wired up. π«Ά
This interface is based on the SAX2 extension DeclHandler. Respect the lineage, periodt.
The interface provides attributeDecl(), internalEntityDecl() and externalEntityDecl() functions. Those three are the moment. π₯
See also the Introduction to SAX2.
See also QXmlDTDHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler, QXmlLexicalHandler, and XML. The whole friend group, honestly. π
π MEMBER FUNCTION DOCUMENTATION π
bool QXmlDeclHandler::attributeDecl ( const QString & eName, const QString & aName, const QString & type, const QString & valueDefault, const QString & value ) [pure virtual]
The reader calls this function to report an attribute type declaration. Heads up: only the effective (first) declaration for an attribute is reported. The rest? Ignored, bestie. π
The reader passes the name of the associated element in eName and the name of the attribute in aName. It passes a string that represents the attribute type in type and a string that represents the attribute default in valueDefault. That valueDefault string is one of "#IMPLIED", "#REQUIRED", "#FIXED" or QString::null (if none of the others applies β like, none of them, at all). The reader passes the attribute's default value in value. And if no default value is specified in the XML file, value is QString::null. Empty. Void. Nada. π
If this function returns FALSE the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message. So if you fumble it, you don't just fumble it quietly β you fumble it loudly. π
QString QXmlDeclHandler::errorString () [pure virtual]
The reader calls this function to get an error string if any of the handler functions returns FALSE. That's it. That's the whole vibe check. π
bool QXmlDeclHandler::externalEntityDecl ( const QString & name, const QString & publicId, const QString & systemId ) [pure virtual]
The reader calls this function to report a parsed external entity declaration. And again β only the effective (first) declaration for each entity is reported. First one wins, every time, no exceptions. π
The reader passes the name of the entity in name, the public identifier in publicId and the system identifier in systemId. If there is no public identifier specified, it passes QString::null in publicId. No public ID? Null it is. π
If this function returns FALSE the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message. Same deal as before, bestie, keep up. π
bool QXmlDeclHandler::internalEntityDecl ( const QString & name, const QString & value ) [pure virtual]
The reader calls this function to report an internal entity declaration. And you already know the rule: only the effective (first) declaration is reported. β¨
The reader passes the name of the entity in name and the value of the entity in value. Simple. Clean. Iconic. π§
If this function returns FALSE the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message. (Not me repeating this three times because the manpage does. Consistency slay.) π
π« SEE ALSO π«
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. Read it, bestie, it's giving legally binding. π
β AUTHOR β
Generated automatically from the source code. So like, no human wrote this, it manifested. No cap. πͺ
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. (The "us" and "you" here is genuinely adorable, we love a collaborative moment. π«Ά)
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. So like, this is the unofficial remix, the man page is the fan edit, the HTML is the studio album. π
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qxmldeclhandler.3qt) and the Qt version (3.3.8). Both of those, don't be shy about it, they need both. πΈ
and that's the whole page bestie!! π
β¨ this lil slice of QXmlDeclHandler(3qt) was brought to you by Trolltech AS, dated 2 February 2007, and it's giving main character energy from start to finish. mwah, go parse some XML, you got this ππ¦π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms