QDomNamedNodeMap(3qt)
π QDomNamedNodeMap π
okay bestie, welcome to the QDomNamedNodeMap(3qt) man page, this is the one from the 3qt manual section and it's literally a whole vibe π¦
β¨ NAME β¨
QDomNamedNodeMap β a collection of nodes that you can access by name π
πΈ SYNOPSIS πΈ
okay so first thing, the important lil disclaimer: all the functions in this class are reentrant when Qt is built with thread support. yes ma'am, thread-safe behavior unlocked π
To even get at it, you pull in the header:
#include <qdom.h>
π«Ά Public Members π«Ά
here's the whole squad, every single one, no skips:
QDomNamedNodeMap ()QDomNamedNodeMap ( const QDomNamedNodeMap & n )QDomNamedNodeMap & operator= ( const QDomNamedNodeMap & n )bool operator== ( const QDomNamedNodeMap & n ) constbool operator!= ( const QDomNamedNodeMap & n ) const~QDomNamedNodeMap ()QDomNode namedItem ( const QString & name ) constQDomNode setNamedItem ( const QDomNode & newNode )QDomNode removeNamedItem ( const QString & name )QDomNode item ( int index ) constQDomNode namedItemNS ( const QString & nsURI, const QString & localName ) constQDomNode setNamedItemNS ( const QDomNode & newNode )QDomNode removeNamedItemNS ( const QString & nsURI, const QString & localName )uint length () constuint count () constbool contains ( const QString & name ) const
π DESCRIPTION π
So the QDomNamedNodeMap class is a collection of nodes that you can access by name. that's it, that's the whole thesis, it's giving "fancy little bag of nodes with name tags on them" π
β οΈ important heads up: QDomNamedNodeMap does not inherit from QDomNodeList. they are NOT the same, do not come for me about it.
Another thing bestie β QDomNamedNodeMaps do not give you any specific node ordering π. And yeah, technically you can grab nodes out of a QDomNamedNodeMap with an ordinal index, but that is simply to allow a convenient enumeration of the contents of a QDomNamedNodeMap, and it does not imply that the DOM specifies an ordering of the nodes. so do not build your whole personality on index order, ok?
So where does this map even show up? The QDomNamedNodeMap is used in three places (the original says <ol type=1>, and it's a numbered list fr fr):
QDomDocumentType::entities()returns a map of all entities described in the DTD. πQDomDocumentType::notations()returns a map of all notations described in the DTD. β¨QDomNode::attributes()returns a map of all attributes of an element. π₯
Items in the map get identified by the name which QDomNode::name() returns. You retrieve nodes with namedItem(), namedItemNS() or item(). You insert new nodes with setNamedItem() or setNamedItemNS(), and you yeet them out with removeNamedItem() or removeNamedItemNS(). Wanna know if something's in there? contains() will tell you if an item with the given name is in the named node map. And how many items you got? length() returns that number, periodt. π―
Terminology: in this class we use "item" and "node" interchangeably. yes it's chaotic, yes it's iconic, we move on π
See also XML.
π¦ MEMBER FUNCTION DOCUMENTATION π¦
QDomNamedNodeMap::QDomNamedNodeMap ()
Constructs an empty named node map. a blank canvas, main character energy, nothing in it yet πΈ
QDomNamedNodeMap::QDomNamedNodeMap ( const QDomNamedNodeMap & n )
Constructs a copy of n. twin behavior π
QDomNamedNodeMap::~QDomNamedNodeMap ()
Destroys the object and frees its resources. rest in peace queen ποΈ
bool QDomNamedNodeMap::contains ( const QString & name ) const
Returns TRUE if the map contains a node called name; otherwise returns FALSE. literally the "are you in the group chat or not" check π«Ά
uint QDomNamedNodeMap::count () const
Returns the number of nodes in the map.
This function is the same as length(). same thing, different name, slay β¨
QDomNode QDomNamedNodeMap::item ( int index ) const
Retrieves the node at position index.
This can be used to iterate over the map. But ngl, note that the nodes in the map are ordered arbitrarily. chaos, honestly π
See also length().
uint QDomNamedNodeMap::length () const
Returns the number of nodes in the map. the headcount, bestie π
See also item().
QDomNode QDomNamedNodeMap::namedItem ( const QString & name ) const
Returns the node called name.
If the named node map does not contain such a node, a null node is returned. and heads up: a node's name is the name returned by QDomNode::nodeName().
See also setNamedItem() and namedItemNS().
QDomNode QDomNamedNodeMap::namedItemNS ( const QString & nsURI, const QString & localName ) const
Returns the node associated with the local name localName and the namespace URI nsURI. namespace girlies rise π
If the map does not contain such a node, a null node is returned.
See also setNamedItemNS() and namedItem().
bool QDomNamedNodeMap::operator!= ( const QDomNamedNodeMap & n ) const
Returns TRUE if n and this named node map are not equal; otherwise returns FALSE. it's giving opposites π
QDomNamedNodeMap & QDomNamedNodeMap::operator= ( const QDomNamedNodeMap & n )
Assigns n to this named node map. it becomes them, no cap π«
bool QDomNamedNodeMap::operator== ( const QDomNamedNodeMap & n ) const
Returns TRUE if n and this named node map are equal; otherwise returns FALSE. soulmates fr fr π
QDomNode QDomNamedNodeMap::removeNamedItem ( const QString & name )
Removes the node called name from the map. bye bestie π
The function returns the removed node, or a null node if the map did not contain a node called name.
See also setNamedItem(), namedItem(), and removeNamedItemNS().
QDomNode QDomNamedNodeMap::removeNamedItemNS ( const QString & nsURI, const QString & localName )
Removes the node with the local name localName and the namespace URI nsURI from the map. namespace-aware removal, obsessed π
The function returns the removed node, or a null node if the map did not contain a node with the local name localName and the namespace URI nsURI.
See also setNamedItemNS(), namedItemNS(), and removeNamedItem().
QDomNode QDomNamedNodeMap::setNamedItem ( const QDomNode & newNode )
Inserts the node newNode into the named node map. The name used by the map is the node name of newNode as returned by QDomNode::nodeName().
If the new node replaces an existing node β i.e. the map contains a node with the same name β the replaced node is returned. traded out, but you still get the old one back, we love a return value π
See also namedItem(), removeNamedItem(), and setNamedItemNS().
QDomNode QDomNamedNodeMap::setNamedItemNS ( const QDomNode & newNode )
Inserts the node newNode 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 newNode. If the new node replaces an existing node, the replaced node is returned.
See also namedItemNS(), removeNamedItemNS(), and setNamedItem().
π SEE ALSO π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.
π AUTHOR π
Generated automatically from the source code. (yes, the robots did it, not me π)
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. π«Ά
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt 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.
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qdomnamednodemap.3qt) and the Qt version (3.3.8). don't be shy, they wanna know π¬
and that's the whole page bestie!! this was Trolltech AS, dated 2 February 2007, and the page itself is QDomNamedNodeMap(3qt) β go forth and name your nodes πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms