⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qxmlnamespacesupport.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
字号:
'\" t.TH QXmlNamespaceSupport 3qt "11 October 2001" "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 NAMEQXmlNamespaceSupport \- Helper class for XML readers which want to include namespace support.PP\fC#include <qxml.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQXmlNamespaceSupport\fR ()".br.ti -1c.BI "\fB~QXmlNamespaceSupport\fR ()".br.ti -1c.BI "void \fBsetPrefix\fR ( const QString & pre, const QString & uri )".br.ti -1c.BI "QString \fBprefix\fR ( const QString & uri ) const".br.ti -1c.BI "QString \fBuri\fR ( const QString & prefix ) const".br.ti -1c.BI "void \fBsplitName\fR ( const QString & qname, QString & prefix, QString & localname ) const".br.ti -1c.BI "void \fBprocessName\fR ( const QString & qname, bool isAttribute, QString & nsuri, QString & localname ) const".br.ti -1c.BI "QStringList \fBprefixes\fR () const".br.ti -1c.BI "QStringList \fBprefixes\fR ( const QString & uri ) const".br.ti -1c.BI "void \fBpushContext\fR ()".br.ti -1c.BI "void \fBpopContext\fR ()".br.ti -1c.BI "void \fBreset\fR ()".br.in -1c.SH DESCRIPTIONThe QXmlNamespaceSupport class is a helper class for XML readers which want to include namespace support..PPYou can set the prefix for the current namespace with setPrefix(), and get the list of current prefixes (or those for a given URI) with prefixes(). The namespace URI is available from uri(). Use pushContext() to start a new namespace context, and popContext() to return to the previous namespace context. Use splitName() or processName() to split a name into its prefix and local name..PPSee also the namespace description..PPSee also XML..SH MEMBER FUNCTION DOCUMENTATION.SH "QXmlNamespaceSupport::QXmlNamespaceSupport ()"Constructs a QXmlNamespaceSupport..SH "QXmlNamespaceSupport::~QXmlNamespaceSupport ()"Destroys a QXmlNamespaceSupport..SH "void QXmlNamespaceSupport::popContext ()"Reverts to the previous namespace context..PPNormally, you should pop the context at the end of each XML element. After popping the context, all namespace prefix mappings that were previously in force are restored..PPSee also pushContext()..SH "QString QXmlNamespaceSupport::prefix ( const QString & uri ) const"Returns one of the prefixes mapped to the namespace URI \fIuri\fR..PPIf more than one prefix is currently mapped to the same URI, this function makes an arbitrary selection; if you want all of the prefixes, use prefixes() instead..PPNote: to check for a default prefix, use the uri() function with an argument of ""..SH "QStringList QXmlNamespaceSupport::prefixes () const"Returns a list of all prefixes currently declared..PPIf there is a default prefix, this function does not return it in the list; check for the default prefix using uri() with an argument of ""..SH "QStringList QXmlNamespaceSupport::prefixes ( const QString & uri ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPReturns a list of all prefixes currently declared for the namespace URI \fIuri\fR..PPThe "xml:" prefix is included. If you only want one prefix that is mapped to the namespace URI, and you don't care which one you get, use the prefix() function instead..PPNote: the empty (default) prefix is never included in this list; to check for the presence of a default namespace, use uri() with an argument of ""..SH "void QXmlNamespaceSupport::processName ( const QString & qname, bool isAttribute, QString & nsuri, QString & localname ) const"Processes a raw XML 1.0 name in the current context by removing the prefix and looking it up among the prefixes currently declared..PP\fIqname\fR is the raw XML 1.0 name to be processed. \fIisAttribute\fR is TRUE if the name is an attribute name..PPThis function stores the namespace URI in \fInsuri\fR (which will get a null string if the raw name has an undeclared prefix), and stores the local name (without prefix) in \fIlocalname\fR (which will get a null string if no namespace is in use)..PPNote that attribute names are processed differently than element names: an unprefixed element name gets the default namespace (if any), while an unprefixed element name does not..SH "void QXmlNamespaceSupport::pushContext ()"Starts a new namespace context..PPNormally, you should push a new context at the beginning of each XML element: the new context automatically inherits the declarations of its parent context, and it also keeps track of which declarations were made within this context..PPSee also popContext()..SH "void QXmlNamespaceSupport::reset ()"Resets this namespace support object for reuse..SH "void QXmlNamespaceSupport::setPrefix ( const QString & pre, const QString & uri )"This function declares a prefix \fIpre\fR in the current namespace context to be the namespace URI \fIuri\fR. The prefix remains in force until this context is popped, unless it is shadowed in a descendant context..PPNote that there is an asymmetry in this library. prefix() does not return the default "" prefix, even if you have declared one; to check for a default prefix, you must look it up explicitly using uri(). This asymmetry exists to make it easier to look up prefixes for attribute names, where the default prefix is not allowed..SH "void QXmlNamespaceSupport::splitName ( const QString & qname, QString & prefix, QString & localname ) const"Splits the name \fIqname\fR at the ':' and returns the prefix in \fIprefix\fR and the local name in \fIlocalname\fR..PPSee also processName()..SH "QString QXmlNamespaceSupport::uri ( const QString & prefix ) const"Looks up the prefix \fIprefix\fR in the current context and returns thecurrently-mapped namespace URI. Use the empty string ("") for the defaultnamespace..SH "SEE ALSO".BR http://doc.trolltech.com/qxmlnamespacesupport.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 (qxmlnamespacesupport.3qt) and the Qtversion (3.0.0).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -