1QDomNamedNodeMap(3qt)                                    QDomNamedNodeMap(3qt)
2
3
4

NAME

6       QDomNamedNodeMap - Collection of nodes that can be accessed by name
7

SYNOPSIS

9       All the functions in this class are reentrant when Qt is built with
10       thread support.</p>
11
12       #include <qdom.h>
13
14   Public Members
15       QDomNamedNodeMap ()
16       QDomNamedNodeMap ( const QDomNamedNodeMap & n )
17       QDomNamedNodeMap & operator= ( const QDomNamedNodeMap & n )
18       bool operator== ( const QDomNamedNodeMap & n ) const
19       bool operator!= ( const QDomNamedNodeMap & n ) const
20       ~QDomNamedNodeMap ()
21       QDomNode namedItem ( const QString & name ) const
22       QDomNode setNamedItem ( const QDomNode & newNode )
23       QDomNode removeNamedItem ( const QString & name )
24       QDomNode item ( int index ) const
25       QDomNode namedItemNS ( const QString & nsURI, const QString & localName
26           ) const
27       QDomNode setNamedItemNS ( const QDomNode & newNode )
28       QDomNode removeNamedItemNS ( const QString & nsURI, const QString &
29           localName )
30       uint length () const
31       uint count () const
32       bool contains ( const QString & name ) const
33

DESCRIPTION

35       The QDomNamedNodeMap class contains a collection of nodes that can be
36       accessed by name.
37
38       Note that QDomNamedNodeMap does not inherit from QDomNodeList.
39       QDomNamedNodeMaps do not provide any specific node ordering. Although
40       nodes in a QDomNamedNodeMap may be accessed by an ordinal index, this
41       is simply to allow a convenient enumeration of the contents of a
42       QDomNamedNodeMap, and does not imply that the DOM specifies an ordering
43       of the nodes.
44
45       The QDomNamedNodeMap is used in three places: <ol type=1>
46
47       1      QDomDocumentType::entities() returns a map of all entities
48              described in the DTD.
49
50       2      QDomDocumentType::notations() returns a map of all notations
51              described in the DTD.
52
53       3      QDomNode::attributes() returns a map of all attributes of an
54              element.
55
56       Items in the map are identified by the name which QDomNode::name()
57       returns. Nodes are retrieved using namedItem(), namedItemNS() or
58       item(). New nodes are inserted with setNamedItem() or setNamedItemNS()
59       and removed with removeNamedItem() or removeNamedItemNS(). Use
60       contains() to see if an item with the given name is in the named node
61       map. The number of items is returned by length().
62
63       Terminology: in this class we use "item" and "node" interchangeably.
64
65       See also XML.
66

MEMBER FUNCTION DOCUMENTATION

QDomNamedNodeMap::QDomNamedNodeMap ()

69       Constructs an empty named node map.
70

QDomNamedNodeMap::QDomNamedNodeMap ( const QDomNamedNodeMap & n )

72       Constructs a copy of n.
73

QDomNamedNodeMap::~QDomNamedNodeMap ()

75       Destroys the object and frees its resources.
76

bool QDomNamedNodeMap::contains ( const QString & name ) const

78       Returns TRUE if the map contains a node called name; otherwise returns
79       FALSE.
80

uint QDomNamedNodeMap::count () const

82       Returns the number of nodes in the map.
83
84       This function is the same as length().
85

QDomNode QDomNamedNodeMap::item ( int index ) const

87       Retrieves the node at position index.
88
89       This can be used to iterate over the map. Note that the nodes in the
90       map are ordered arbitrarily.
91
92       See also length().
93

uint QDomNamedNodeMap::length () const

95       Returns the number of nodes in the map.
96
97       See also item().
98

QDomNode QDomNamedNodeMap::namedItem ( const QString & name ) const

100       Returns the node called name.
101
102       If the named node map does not contain such a node, a null node is
103       returned. A node's name is the name returned by QDomNode::nodeName().
104
105       See also setNamedItem() and namedItemNS().
106

QDomNode QDomNamedNodeMap::namedItemNS ( const QString & nsURI, const QString

108       & localName ) const
109       Returns the node associated with the local name localName and the
110       namespace URI nsURI.
111
112       If the map does not contain such a node, a null node is returned.
113
114       See also setNamedItemNS() and namedItem().
115

bool QDomNamedNodeMap::operator!= ( const QDomNamedNodeMap & n ) const

117       Returns TRUE if n and this named node map are not equal; otherwise
118       returns FALSE.
119

QDomNamedNodeMap & QDomNamedNodeMap::operator= ( const QDomNamedNodeMap & n )

121       Assigns n to this named node map.
122

bool QDomNamedNodeMap::operator== ( const QDomNamedNodeMap & n ) const

124       Returns TRUE if n and this named node map are equal; otherwise returns
125       FALSE.
126

QDomNode QDomNamedNodeMap::removeNamedItem ( const QString & name )

128       Removes the node called name from the map.
129
130       The function returns the removed node or a null node if the map did not
131       contain a node called name.
132
133       See also setNamedItem(), namedItem(), and removeNamedItemNS().
134

QDomNode QDomNamedNodeMap::removeNamedItemNS ( const QString & nsURI, const

136       QString & localName )
137       Removes the node with the local name localName and the namespace URI
138       nsURI from the map.
139
140       The function returns the removed node or a null node if the map did not
141       contain a node with the local name localName and the namespace URI
142       nsURI.
143
144       See also setNamedItemNS(), namedItemNS(), and removeNamedItem().
145

QDomNode QDomNamedNodeMap::setNamedItem ( const QDomNode & newNode )

147       Inserts the node newNode into the named node map. The name used by the
148       map is the node name of newNode as returned by QDomNode::nodeName().
149
150       If the new node replaces an existing node, i.e. the map contains a node
151       with the same name, the replaced node is returned.
152
153       See also namedItem(), removeNamedItem(), and setNamedItemNS().
154

QDomNode QDomNamedNodeMap::setNamedItemNS ( const QDomNode & newNode )

156       Inserts the node newNode in the map. If a node with the same namespace
157       URI and the same local name already exists in the map, it is replaced
158       by newNode. If the new node replaces an existing node, the replaced
159       node is returned.
160
161       See also namedItemNS(), removeNamedItemNS(), and setNamedItem().
162
163

SEE ALSO

165       http://doc.trolltech.com/qdomnamednodemap.html
166       http://www.trolltech.com/faq/tech.html
167
169       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
170       license file included in the distribution for a complete license
171       statement.
172

AUTHOR

174       Generated automatically from the source code.
175

BUGS

177       If you find a bug in Qt, please report it as described in
178       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
179       help you. Thank you.
180
181       The definitive Qt documentation is provided in HTML format; it is
182       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
183       web browser. This man page is provided as a convenience for those users
184       who prefer man pages, although this format is not officially supported
185       by Trolltech.
186
187       If you find errors in this manual page, please report them to qt-
188       bugs@trolltech.com.  Please include the name of the manual page
189       (qdomnamednodemap.3qt) and the Qt version (3.3.8).
190
191
192
193Trolltech AS                    2 February 2007          QDomNamedNodeMap(3qt)
Impressum