summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqdomnamednodemap.3qt
blob: a9473f1e6c227d41fc8b0e6a2c33ced7bc426e5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
'\" t
.TH TQDomNamedNodeMap 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.
.\"
.ad l
.nh
.SH NAME
TQDomNamedNodeMap \- Collection of nodes that can be accessed by name
.SH SYNOPSIS
All the functions in this class are reentrant when TQt is built with thread support.</p>
.PP
\fC#include <tqdom.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQDomNamedNodeMap\fR ()"
.br
.ti -1c
.BI "\fBTQDomNamedNodeMap\fR ( const TQDomNamedNodeMap & n )"
.br
.ti -1c
.BI "TQDomNamedNodeMap & \fBoperator=\fR ( const TQDomNamedNodeMap & n )"
.br
.ti -1c
.BI "bool \fBoperator==\fR ( const TQDomNamedNodeMap & n ) const"
.br
.ti -1c
.BI "bool \fBoperator!=\fR ( const TQDomNamedNodeMap & n ) const"
.br
.ti -1c
.BI "\fB~TQDomNamedNodeMap\fR ()"
.br
.ti -1c
.BI "TQDomNode \fBnamedItem\fR ( const TQString & name ) const"
.br
.ti -1c
.BI "TQDomNode \fBsetNamedItem\fR ( const TQDomNode & newNode )"
.br
.ti -1c
.BI "TQDomNode \fBremoveNamedItem\fR ( const TQString & name )"
.br
.ti -1c
.BI "TQDomNode \fBitem\fR ( int index ) const"
.br
.ti -1c
.BI "TQDomNode \fBnamedItemNS\fR ( const TQString & nsURI, const TQString & localName ) const"
.br
.ti -1c
.BI "TQDomNode \fBsetNamedItemNS\fR ( const TQDomNode & newNode )"
.br
.ti -1c
.BI "TQDomNode \fBremoveNamedItemNS\fR ( const TQString & nsURI, const TQString & localName )"
.br
.ti -1c
.BI "uint \fBlength\fR () const"
.br
.ti -1c
.BI "uint \fBcount\fR () const"
.br
.ti -1c
.BI "bool \fBcontains\fR ( const TQString & name ) const"
.br
.in -1c
.SH DESCRIPTION
The TQDomNamedNodeMap class contains a collection of nodes that can be accessed by name.
.PP
Note that TQDomNamedNodeMap does not inherit from TQDomNodeList. TQDomNamedNodeMaps do not provide any specific node ordering. Although nodes in a TQDomNamedNodeMap may be accessed by an ordinal index, this is simply to allow a convenient enumeration of the contents of a TQDomNamedNodeMap, and does not imply that the DOM specifies an ordering of the nodes.
.PP
The TQDomNamedNodeMap is used in three places: <ol type=1>
.IP 1
TQDomDocumentType::entities() returns a map of all entities described in the DTD.
.IP 2
TQDomDocumentType::notations() returns a map of all notations described in the DTD.
.IP 3
TQDomNode::attributes() returns a map of all attributes of an element.
.PP
Items in the map are identified by the name which TQDomNode::name() returns. Nodes are retrieved using namedItem(), namedItemNS() or item(). New nodes are inserted with setNamedItem() or setNamedItemNS() and removed with removeNamedItem() or removeNamedItemNS(). Use contains() to see if an item with the given name is in the named node map. The number of items is returned by length().
.PP
Terminology: in this class we use "item" and "node" interchangeably.
.PP
See also XML.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQDomNamedNodeMap::TQDomNamedNodeMap ()"
Constructs an empty named node map.
.SH "TQDomNamedNodeMap::TQDomNamedNodeMap ( const TQDomNamedNodeMap & n )"
Constructs a copy of \fIn\fR.
.SH "TQDomNamedNodeMap::~TQDomNamedNodeMap ()"
Destroys the object and frees its resources.
.SH "bool TQDomNamedNodeMap::contains ( const TQString & name ) const"
Returns TRUE if the map contains a node called \fIname\fR; otherwise returns FALSE.
.SH "uint TQDomNamedNodeMap::count () const"
Returns the number of nodes in the map.
.PP
This function is the same as length().
.SH "TQDomNode TQDomNamedNodeMap::item ( int index ) const"
Retrieves the node at position \fIindex\fR.
.PP
This can be used to iterate over the map. Note that the nodes in the map are ordered arbitrarily.
.PP
See also length().
.SH "uint TQDomNamedNodeMap::length () const"
Returns the number of nodes in the map.
.PP
See also item().
.SH "TQDomNode TQDomNamedNodeMap::namedItem ( const TQString & name ) const"
Returns the node called \fIname\fR.
.PP
If the named node map does not contain such a node, a null node is returned. A node's name is the name returned by TQDomNode::nodeName().
.PP
See also setNamedItem() and namedItemNS().
.SH "TQDomNode TQDomNamedNodeMap::namedItemNS ( const TQString & nsURI, const TQString & localName ) const"
Returns the node associated with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR.
.PP
If the map does not contain such a node, a null node is returned.
.PP
See also setNamedItemNS() and namedItem().
.SH "bool TQDomNamedNodeMap::operator!= ( const TQDomNamedNodeMap & n ) const"
Returns TRUE if \fIn\fR and this named node map are not equal; otherwise returns FALSE.
.SH "TQDomNamedNodeMap & TQDomNamedNodeMap::operator= ( const TQDomNamedNodeMap & n )"
Assigns \fIn\fR to this named node map.
.SH "bool TQDomNamedNodeMap::operator== ( const TQDomNamedNodeMap & n ) const"
Returns TRUE if \fIn\fR and this named node map are equal; otherwise returns FALSE.
.SH "TQDomNode TQDomNamedNodeMap::removeNamedItem ( const TQString & name )"
Removes the node called \fIname\fR from the map.
.PP
The function returns the removed node or a null node if the map did not contain a node called \fIname\fR.
.PP
See also setNamedItem(), namedItem(), and removeNamedItemNS().
.SH "TQDomNode TQDomNamedNodeMap::removeNamedItemNS ( const TQString & nsURI, const TQString & localName )"
Removes the node with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR from the map.
.PP
The function returns the removed node or a null node if the map did not contain a node with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR.
.PP
See also setNamedItemNS(), namedItemNS(), and removeNamedItem().
.SH "TQDomNode TQDomNamedNodeMap::setNamedItem ( const TQDomNode & newNode )"
Inserts the node \fInewNode\fR into the named node map. The name used by the map is the node name of \fInewNode\fR as returned by TQDomNode::nodeName().
.PP
If the new node replaces an existing node, i.e. the map contains a node with the same name, the replaced node is returned.
.PP
See also namedItem(), removeNamedItem(), and setNamedItemNS().
.SH "TQDomNode TQDomNamedNodeMap::setNamedItemNS ( const TQDomNode & newNode )"
Inserts the node \fInewNode\fR in the map. If a node with the same namespace URI and the same local name already exists in the map, it is replaced by \fInewNode\fR. If the new node replaces an existing node, the replaced node is returned.
.PP
See also namedItemNS(), removeNamedItemNS(), and setNamedItem().

.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqdomnamednodemap.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If 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.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt 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. 
.P
If you find errors in this manual page, please report them to
.BR [email protected] .
Please include the name of the manual page (tqdomnamednodemap.3qt) and the Qt
version (3.3.8).