Eneboo - Documentación para desarrolladores
Métodos públicos | Amigas
Referencia de la Clase QDomNamedNodeMap

The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.XMLNote that QDomNamedNodeMap does not inherit from QDomNodeList. QDomNamedNodeMaps do not provide any specific node ordering. Although nodes in a QDomNamedNodeMap may be accessed by an ordinal index, this is simply to allow a convenient enumeration of the contents of a QDomNamedNodeMap, and does not imply that the DOM specifies an ordering of the nodes. Más...

#include <qdom.h>

Lista de todos los miembros.

Métodos públicos

 QDomNamedNodeMap ()
 QDomNamedNodeMap (const QDomNamedNodeMap &)
QDomNamedNodeMapoperator= (const QDomNamedNodeMap &)
bool operator== (const QDomNamedNodeMap &) const
bool operator!= (const QDomNamedNodeMap &) 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
 QDomNamedNodeMap ()
 QDomNamedNodeMap (const QDomNamedNodeMap &)
QDomNamedNodeMapoperator= (const QDomNamedNodeMap &)
bool operator== (const QDomNamedNodeMap &) const
bool operator!= (const QDomNamedNodeMap &) 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

Amigas

class QDomNode
class QDomDocumentType
class QDomElement

Descripción detallada

The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.

XML

Note that QDomNamedNodeMap does not inherit from QDomNodeList. QDomNamedNodeMaps do not provide any specific node ordering. Although nodes in a QDomNamedNodeMap may be accessed by an ordinal index, this is simply to allow a convenient enumeration of the contents of a QDomNamedNodeMap, and does not imply that the DOM specifies an ordering of the nodes.

The QDomNamedNodeMap is used in three places: 1 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 are identified by the name which QDomNode::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().

Terminology: in this class we use "item" and "node" interchangeably.


Documentación del constructor y destructor

QDomNamedNodeMap::QDomNamedNodeMap ( )

Constructs an empty named node map.

QDomNamedNodeMap::QDomNamedNodeMap ( const QDomNamedNodeMap n)

Constructs a copy of n.

QDomNamedNodeMap::~QDomNamedNodeMap ( )

Destroys the object and frees its resources.

QDomNamedNodeMap::QDomNamedNodeMap ( )
QDomNamedNodeMap::QDomNamedNodeMap ( const QDomNamedNodeMap )
QDomNamedNodeMap::~QDomNamedNodeMap ( )

Documentación de las funciones miembro

bool QDomNamedNodeMap::contains ( const QString name) const

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

bool QDomNamedNodeMap::contains ( const QString name) const
uint QDomNamedNodeMap::count ( ) const [inline]

Returns the number of nodes in the map.

This function is the same as length().

uint QDomNamedNodeMap::count ( ) const [inline]
QDomNode QDomNamedNodeMap::item ( int  index) const
QDomNode QDomNamedNodeMap::item ( int  index) const

Retrieves the node at position index.

This can be used to iterate over the map. Note that the nodes in the map are ordered arbitrarily.

Ver también:
length()
uint QDomNamedNodeMap::length ( void  ) const

Returns the number of nodes in the map.

Ver también:
item()
uint QDomNamedNodeMap::length ( ) const
QDomNode QDomNamedNodeMap::namedItem ( const QString name) const
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. A node's name is the name returned by QDomNode::nodeName().

Ver también:
setNamedItem() 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.

If the map does not contain such a node, a null node is returned.

Ver también:
setNamedItemNS() namedItem()
QDomNode QDomNamedNodeMap::namedItemNS ( const QString nsURI,
const QString localName 
) const
bool QDomNamedNodeMap::operator!= ( const QDomNamedNodeMap n) const

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

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

Assigns n to this named node map.

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

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

QDomNode QDomNamedNodeMap::removeNamedItem ( const QString name)
QDomNode QDomNamedNodeMap::removeNamedItem ( const QString name)

Removes the node called name from the map.

The function returns the removed node or a null node if the map did not contain a node called name.

Ver también:
setNamedItem() namedItem() 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.

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.

Ver también:
setNamedItemNS() namedItemNS() removeNamedItem()
QDomNode QDomNamedNodeMap::removeNamedItemNS ( const QString nsURI,
const QString localName 
)
QDomNode QDomNamedNodeMap::setNamedItem ( const QDomNode newNode)
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.

Ver también:
namedItem() removeNamedItem() 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.

Ver también:
namedItemNS() removeNamedItemNS() setNamedItem()
QDomNode QDomNamedNodeMap::setNamedItemNS ( const QDomNode newNode)

Documentación de las funciones relacionadas y clases amigas

QDomDocumentType [friend]
QDomElement [friend]
QDomNode [friend]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'