QDomNamedNodeMap(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– 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 ) const
  • bool operator!= ( const QDomNamedNodeMap & n ) const
  • ~QDomNamedNodeMap ()
  • QDomNode namedItem ( const QString & name ) const
  • QDomNode setNamedItem ( const QDomNode & newNode )
  • QDomNode removeNamedItem ( const QString & name )
  • QDomNode item ( int index ) const
  • QDomNode namedItemNS ( const QString & nsURI, const QString & localName ) const
  • QDomNode setNamedItemNS ( const QDomNode & newNode )
  • QDomNode removeNamedItemNS ( const QString & nsURI, const QString & localName )
  • uint length () const
  • uint count () const
  • bool 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):

  1. QDomDocumentType::entities() returns a map of all entities described in the DTD. πŸ‘‘
  2. QDomDocumentType::notations() returns a map of all notations described in the DTD. ✨
  3. 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 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