diff options
Diffstat (limited to 'doc/man/man3/tqdomelement.3qt')
-rw-r--r-- | doc/man/man3/tqdomelement.3qt | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/doc/man/man3/tqdomelement.3qt b/doc/man/man3/tqdomelement.3qt index 916e7b0fa..e65d140e2 100644 --- a/doc/man/man3/tqdomelement.3qt +++ b/doc/man/man3/tqdomelement.3qt @@ -1,5 +1,5 @@ '\" t -.TH QDomElement 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQDomElement 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,27 +7,27 @@ .ad l .nh .SH NAME -QDomElement \- Represents one element in the DOM tree +TQDomElement \- Represents one element in the DOM tree .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.</p> .PP -\fC#include <ntqdom.h>\fR +\fC#include <tqdom.h>\fR .PP -Inherits QDomNode. +Inherits TQDomNode. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQDomElement\fR ()" +.BI "\fBTQDomElement\fR ()" .br .ti -1c -.BI "\fBQDomElement\fR ( const QDomElement & x )" +.BI "\fBTQDomElement\fR ( const TQDomElement & x )" .br .ti -1c -.BI "QDomElement & \fBoperator=\fR ( const QDomElement & x )" +.BI "TQDomElement & \fBoperator=\fR ( const TQDomElement & x )" .br .ti -1c -.BI "\fB~QDomElement\fR ()" +.BI "\fB~TQDomElement\fR ()" .br .ti -1c .BI "TQString \fBattribute\fR ( const TQString & name, const TQString & defValue = TQString::null ) const" @@ -54,16 +54,16 @@ Inherits QDomNode. .BI "void \fBremoveAttribute\fR ( const TQString & name )" .br .ti -1c -.BI "QDomAttr \fBattributeNode\fR ( const TQString & name )" +.BI "TQDomAttr \fBattributeNode\fR ( const TQString & name )" .br .ti -1c -.BI "QDomAttr \fBsetAttributeNode\fR ( const QDomAttr & newAttr )" +.BI "TQDomAttr \fBsetAttributeNode\fR ( const TQDomAttr & newAttr )" .br .ti -1c -.BI "QDomAttr \fBremoveAttributeNode\fR ( const QDomAttr & oldAttr )" +.BI "TQDomAttr \fBremoveAttributeNode\fR ( const TQDomAttr & oldAttr )" .br .ti -1c -.BI "virtual QDomNodeList \fBelementsByTagName\fR ( const TQString & tagname ) const" +.BI "virtual TQDomNodeList \fBelementsByTagName\fR ( const TQString & tagname ) const" .br .ti -1c .BI "bool \fBhasAttribute\fR ( const TQString & name ) const" @@ -93,13 +93,13 @@ Inherits QDomNode. .BI "void \fBremoveAttributeNS\fR ( const TQString & nsURI, const TQString & localName )" .br .ti -1c -.BI "QDomAttr \fBattributeNodeNS\fR ( const TQString & nsURI, const TQString & localName )" +.BI "TQDomAttr \fBattributeNodeNS\fR ( const TQString & nsURI, const TQString & localName )" .br .ti -1c -.BI "QDomAttr \fBsetAttributeNodeNS\fR ( const QDomAttr & newAttr )" +.BI "TQDomAttr \fBsetAttributeNodeNS\fR ( const TQDomAttr & newAttr )" .br .ti -1c -.BI "virtual QDomNodeList \fBelementsByTagNameNS\fR ( const TQString & nsURI, const TQString & localName ) const" +.BI "virtual TQDomNodeList \fBelementsByTagNameNS\fR ( const TQString & nsURI, const TQString & localName ) const" .br .ti -1c .BI "bool \fBhasAttributeNS\fR ( const TQString & nsURI, const TQString & localName ) const" @@ -111,10 +111,10 @@ Inherits QDomNode. .BI "void \fBsetTagName\fR ( const TQString & name )" .br .ti -1c -.BI "virtual QDomNamedNodeMap \fBattributes\fR () const" +.BI "virtual TQDomNamedNodeMap \fBattributes\fR () const" .br .ti -1c -.BI "virtual QDomNode::NodeType \fBnodeType\fR () const" +.BI "virtual TQDomNode::NodeType \fBnodeType\fR () const" .br .ti -1c .BI "virtual bool \fBisElement\fR () const" @@ -124,36 +124,36 @@ Inherits QDomNode. .br .in -1c .SH DESCRIPTION -The QDomElement class represents one element in the DOM tree. +The TQDomElement class represents one element in the DOM tree. .PP Elements have a tagName() and zero or more attributes associated with them. The tag name can be changed with setTagName(). .PP -Element attributes are represented by QDomAttr objects that can be queried using the attribute() and attributeNode() functions. You can set attributes with the setAttribute() and setAttributeNode() functions. Attributes can be removed with removeAttribute(). There are namespace-aware equivalents to these functions, i.e. setAttributeNS(), setAttributeNodeNS() and removeAttributeNS(). +Element attributes are represented by TQDomAttr objects that can be queried using the attribute() and attributeNode() functions. You can set attributes with the setAttribute() and setAttributeNode() functions. Attributes can be removed with removeAttribute(). There are namespace-aware equivalents to these functions, i.e. setAttributeNS(), setAttributeNodeNS() and removeAttributeNS(). .PP If you want to access the text of a node use text(), e.g. .PP .nf .br - QDomElement e = //... + TQDomElement e = //... .br //... .br TQString s = e.text() .br .fi -The text() function operates recursively to find the text (since not all elements contain text). If you want to find all the text in all of a node's children, iterate over the children looking for QDomText nodes, e.g. +The text() function operates recursively to find the text (since not all elements contain text). If you want to find all the text in all of a node's children, iterate over the children looking for TQDomText nodes, e.g. .PP .nf .br TQString text; .br - QDomElement element = doc.documentElement(); + TQDomElement element = doc.documentElement(); .br - for( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) .br { .br - QDomText t = n.toText(); + TQDomText t = n.toText(); .br if ( !t.isNull() ) .br @@ -166,123 +166,123 @@ Note that we attempt to convert each node to a text node and use text() rather t .PP You can get a list of all the decendents of an element which have a specified tag name with elementsByTagName() or elementsByTagNameNS(). .PP -For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/. For a more general introduction of the DOM implementation see the QDomDocument documentation. +For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/. For a more general introduction of the DOM implementation see the TQDomDocument documentation. .PP See also XML. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QDomElement::QDomElement ()" -Constructs an empty element. Use the QDomDocument::createElement() function to construct elements with content. -.SH "QDomElement::QDomElement ( const QDomElement & x )" +.SH "TQDomElement::TQDomElement ()" +Constructs an empty element. Use the TQDomDocument::createElement() function to construct elements with content. +.SH "TQDomElement::TQDomElement ( const TQDomElement & x )" Constructs a copy of \fIx\fR. .PP The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode(). -.SH "QDomElement::~QDomElement ()" +.SH "TQDomElement::~TQDomElement ()" Destroys the object and frees its resources. -.SH "TQString QDomElement::attribute ( const TQString & name, const TQString & defValue = TQString::null ) const" +.SH "TQString TQDomElement::attribute ( const TQString & name, const TQString & defValue = TQString::null ) const" Returns the attribute called \fIname\fR. If the attribute does not exist \fIdefValue\fR is returned. .PP See also setAttribute(), attributeNode(), setAttributeNode(), and attributeNS(). -.SH "TQString QDomElement::attributeNS ( const TQString nsURI, const TQString & localName, const TQString & defValue ) const" +.SH "TQString TQDomElement::attributeNS ( const TQString nsURI, const TQString & localName, const TQString & defValue ) const" Returns the attribute with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR. If the attribute does not exist \fIdefValue\fR is returned. .PP See also setAttributeNS(), attributeNodeNS(), setAttributeNodeNS(), and attribute(). -.SH "QDomAttr QDomElement::attributeNode ( const TQString & name )" -Returns the QDomAttr object that corresponds to the attribute called \fIname\fR. If no such attribute exists a null attribute is returned. +.SH "TQDomAttr TQDomElement::attributeNode ( const TQString & name )" +Returns the TQDomAttr object that corresponds to the attribute called \fIname\fR. If no such attribute exists a null attribute is returned. .PP See also setAttributeNode(), attribute(), setAttribute(), and attributeNodeNS(). -.SH "QDomAttr QDomElement::attributeNodeNS ( const TQString & nsURI, const TQString & localName )" -Returns the QDomAttr object that corresponds to the attribute with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR. If no such attribute exists a null attribute is returned. +.SH "TQDomAttr TQDomElement::attributeNodeNS ( const TQString & nsURI, const TQString & localName )" +Returns the TQDomAttr object that corresponds to the attribute with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR. If no such attribute exists a null attribute is returned. .PP See also setAttributeNode(), attribute(), and setAttribute(). -.SH "QDomNamedNodeMap QDomElement::attributes () const\fC [virtual]\fR" -Returns a QDomNamedNodeMap containing all this element's attributes. +.SH "TQDomNamedNodeMap TQDomElement::attributes () const\fC [virtual]\fR" +Returns a TQDomNamedNodeMap containing all this element's attributes. .PP See also attribute(), setAttribute(), attributeNode(), and setAttributeNode(). .PP -Reimplemented from QDomNode. -.SH "QDomNodeList QDomElement::elementsByTagName ( const TQString & tagname ) const\fC [virtual]\fR" -Returns a QDomNodeList containing all descendent elements of this element that are called \fItagname\fR. The order they are in the node list is the order they are encountered in a preorder traversal of the element tree. +Reimplemented from TQDomNode. +.SH "TQDomNodeList TQDomElement::elementsByTagName ( const TQString & tagname ) const\fC [virtual]\fR" +Returns a TQDomNodeList containing all descendent elements of this element that are called \fItagname\fR. The order they are in the node list is the order they are encountered in a preorder traversal of the element tree. .PP -See also elementsByTagNameNS() and QDomDocument::elementsByTagName(). -.SH "QDomNodeList QDomElement::elementsByTagNameNS ( const TQString & nsURI, const TQString & localName ) const\fC [virtual]\fR" -Returns a QDomNodeList containing all the descendent elements of this element with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR. The order they are in the node list is the order they are encountered in a preorder traversal of the element tree. +See also elementsByTagNameNS() and TQDomDocument::elementsByTagName(). +.SH "TQDomNodeList TQDomElement::elementsByTagNameNS ( const TQString & nsURI, const TQString & localName ) const\fC [virtual]\fR" +Returns a TQDomNodeList containing all the descendent elements of this element with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR. The order they are in the node list is the order they are encountered in a preorder traversal of the element tree. .PP -See also elementsByTagName() and QDomDocument::elementsByTagNameNS(). -.SH "bool QDomElement::hasAttribute ( const TQString & name ) const" +See also elementsByTagName() and TQDomDocument::elementsByTagNameNS(). +.SH "bool TQDomElement::hasAttribute ( const TQString & name ) const" Returns TRUE if this element has an attribute called \fIname\fR; otherwise returns FALSE. -.SH "bool QDomElement::hasAttributeNS ( const TQString & nsURI, const TQString & localName ) const" +.SH "bool TQDomElement::hasAttributeNS ( const TQString & nsURI, const TQString & localName ) const" Returns TRUE if this element has an attribute with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR; otherwise returns FALSE. -.SH "bool QDomElement::isElement () const\fC [virtual]\fR" +.SH "bool TQDomElement::isElement () const\fC [virtual]\fR" Returns TRUE. .PP -Reimplemented from QDomNode. -.SH "QDomNode::NodeType QDomElement::nodeType () const\fC [virtual]\fR" +Reimplemented from TQDomNode. +.SH "TQDomNode::NodeType TQDomElement::nodeType () const\fC [virtual]\fR" Returns ElementNode. .PP -Reimplemented from QDomNode. -.SH "QDomElement & QDomElement::operator= ( const QDomElement & x )" +Reimplemented from TQDomNode. +.SH "TQDomElement & TQDomElement::operator= ( const TQDomElement & x )" Assigns \fIx\fR to this DOM element. .PP The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode(). -.SH "void QDomElement::removeAttribute ( const TQString & name )" +.SH "void TQDomElement::removeAttribute ( const TQString & name )" Removes the attribute called name \fIname\fR from this element. .PP See also setAttribute(), attribute(), and removeAttributeNS(). -.SH "void QDomElement::removeAttributeNS ( const TQString & nsURI, const TQString & localName )" +.SH "void TQDomElement::removeAttributeNS ( const TQString & nsURI, const TQString & localName )" Removes the attribute with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR from this element. .PP See also setAttributeNS(), attributeNS(), and removeAttribute(). -.SH "QDomAttr QDomElement::removeAttributeNode ( const QDomAttr & oldAttr )" +.SH "TQDomAttr TQDomElement::removeAttributeNode ( const TQDomAttr & oldAttr )" Removes the attribute \fIoldAttr\fR from the element and returns it. .PP See also attributeNode() and setAttributeNode(). -.SH "void QDomElement::setAttribute ( const TQString & name, const TQString & value )" +.SH "void TQDomElement::setAttribute ( const TQString & name, const TQString & value )" Adds an attribute called \fIname\fR with value \fIvalue\fR. If an attribute with the same name exists, its value is replaced by \fIvalue\fR. .PP See also attribute(), setAttributeNode(), and setAttributeNS(). -.SH "void QDomElement::setAttribute ( const TQString & name, int value )" +.SH "void TQDomElement::setAttribute ( const TQString & name, int value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttribute ( const TQString & name, uint value )" +.SH "void TQDomElement::setAttribute ( const TQString & name, uint value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttribute ( const TQString & name, long value )" +.SH "void TQDomElement::setAttribute ( const TQString & name, long value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttribute ( const TQString & name, ulong value )" +.SH "void TQDomElement::setAttribute ( const TQString & name, ulong value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttribute ( const TQString & name, double value )" +.SH "void TQDomElement::setAttribute ( const TQString & name, double value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, const TQString & value )" +.SH "void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, const TQString & value )" Adds an attribute with the qualified name \fIqName\fR and the namespace URI \fInsURI\fR with the value \fIvalue\fR. If an attribute with the same local name and namespace URI exists, its prefix is replaced by the prefix of \fIqName\fR and its value is repaced by \fIvalue\fR. .PP Although \fIqName\fR is the qualified name, the local name is used to decide if an existing attribute's value should be replaced. .PP See also attributeNS(), setAttributeNodeNS(), and setAttribute(). -.SH "void QDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, int value )" +.SH "void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, int value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, uint value )" +.SH "void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, uint value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, long value )" +.SH "void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, long value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, ulong value )" +.SH "void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, ulong value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, double value )" +.SH "void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, double value )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "QDomAttr QDomElement::setAttributeNode ( const QDomAttr & newAttr )" +.SH "TQDomAttr TQDomElement::setAttributeNode ( const TQDomAttr & newAttr )" Adds the attribute \fInewAttr\fR to this element. .PP If the element has another attribute that has the same name as \fInewAttr\fR, this function replaces that attribute and returns it; otherwise the function returns a null attribute. .PP See also attributeNode(), setAttribute(), and setAttributeNodeNS(). -.SH "QDomAttr QDomElement::setAttributeNodeNS ( const QDomAttr & newAttr )" +.SH "TQDomAttr TQDomElement::setAttributeNodeNS ( const TQDomAttr & newAttr )" Adds the attribute \fInewAttr\fR to this element. .PP If the element has another attribute that has the same local name and namespace URI as \fInewAttr\fR, this function replaces that attribute and returns it; otherwise the function returns a null attribute. .PP See also attributeNodeNS(), setAttributeNS(), and setAttributeNode(). -.SH "void QDomElement::setTagName ( const TQString & name )" +.SH "void TQDomElement::setTagName ( const TQString & name )" Sets this element's tag name to \fIname\fR. .PP See also tagName(). -.SH "TQString QDomElement::tagName () const" +.SH "TQString TQDomElement::tagName () const" Returns the tag name of this element. For an XML element like this: .PP .nf @@ -293,7 +293,7 @@ Returns the tag name of this element. For an XML element like this: the tagname would return "img". .PP See also setTagName(). -.SH "TQString QDomElement::text () const" +.SH "TQString TQDomElement::text () const" Returns the element's text or TQString::null. .PP Example: @@ -304,13 +304,13 @@ Example: .br .fi .PP -The function text() of the QDomElement for the <h1> tag, will return "Hello TQt <xml is cool>". +The function text() of the TQDomElement for the <h1> tag, will return "Hello TQt <xml is cool>". .PP -Comments are ignored by this function. It only evaluates QDomText -and QDomCDATASection objects. +Comments are ignored by this function. It only evaluates TQDomText +and TQDomCDATASection objects. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qdomelement.html +.BR http://doc.trolltech.com/tqdomelement.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the |