📄 qdomattr.3qt
字号:
'\" t.TH QDomAttr 3qt "5 August 2004" "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 NAMEQDomAttr \- Represents one attribute of a.br.PP\fC#include <qdom.h>\fR.PPInherits QDomNode..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQDomAttr\fR () ".br.ti -1c.BI "\fBQDomAttr\fR ( const QDomAttr & x ) ".br.ti -1c.BI "QDomAttr& \fBoperator=\fR ( const QDomAttr & ) ".br.ti -1c.BI "\fB~QDomAttr\fR () ".br.ti -1c.BI "virtual QString \fBname\fR () const".br.ti -1c.BI "virtual bool \fBspecified\fR () const".br.ti -1c.BI "virtual QString \fBvalue\fR () const".br.ti -1c.BI "virtual void \fBsetValue\fR ( const QString & ) ".br.ti -1c.BI "virtual QDomNode::NodeType \fBnodeType\fR () const".br.ti -1c.BI "virtual bool \fBisAttr\fR () const".br.in -1c.SH DESCRIPTIONThe QDomAttr class represents one attribute of a QDomElement..PPFor example, the following piece of XML gives an element with no children, but two attributes:.PP.nf.br <link href="http://www.trolltech.com" color="red" />.fi.PPOne can use the attributes of an element with code similar to:.PP.nf.br QDomElement e = ....;.br QDomAttr a = e.attributeNode( "href" );.br cout << a.value() << endl // gives "http://www.trolltech.com".br a.setValue( "http://doc.trolltech.com" );.br QDomAttr a2 = e.attributeNode( "href" );.br cout << a2.value() << endl // gives "http://doc.trolltech.com".fi.PPThis example also shows that changing an attribute received from an element changes the attribute of the element. If you do not want to change the value of the element's attribute you have to use cloneNode() to get an independent copy of the attribute..PPFor further information about the Document Objct Model see http://www.w3.org/TR/REC-DOM-Level-1/. For a more general introduction of the DOM implementation see the QDomDocument documentation..SH MEMBER FUNCTION DOCUMENTATION.SH "QDomAttr::QDomAttr ()"Constructs an empty attribute..SH "QDomAttr::QDomAttr ( const QDomAttr & x )"Copy constructor..PPThe data of the copy is shared: modifying one will also change the other. If you want to make a real copy, use cloneNode() instead..SH "QDomAttr::~QDomAttr ()"Destructor..SH "bool QDomAttr::isAttr () const \fC[virtual]\fR"Returns TRUE..PPReimplemented from QDomNode..SH "QString QDomAttr::name () const \fC[virtual]\fR"Returns the name of the attribute..SH "QDomNode::NodeType QDomAttr::nodeType() const \fC[virtual]\fR"Returns \fCAttributeNode.\fR.PPReimplemented from QDomNode..SH "QDomAttr& QDomAttr::operator= ( const QDomAttr & x )"Assignment operator..PPThe data of the copy is shared: modifying one will also change the other. If you want to make a real copy, use cloneNode() instead..SH "void QDomAttr::setValue ( const QString & v ) \fC[virtual]\fR"Sets the value of the attribute to \fIv.\fR.PPSee also value()..SH "bool QDomAttr::specified () const \fC[virtual]\fR"Returns TRUE if the attribute has been expicitly specified in the XML document or was set by the user with setValue(), otherwise FALSE..PPSee also setValue()..SH "QString QDomAttr::value () const \fC[virtual]\fR"Returns the current value of the attribute. Returns a null string when the attribute has not been specified..PPSee also specified() and setValue()..SH "SEE ALSO".BR http://doc.trolltech.com/qdomattr.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 make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qdomattr.3qt) and the Qtversion (2.3.8).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -