File: qdomnamednodemap.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (48 lines) | stat: -rw-r--r-- 11,704 bytes parent folder | download
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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDomNamedNodeMap Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDomNamedNodeMap Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdomnamednodemap.html#QDomNamedNodeMap">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomnamednodemap.html#QDomNamedNodeMap-2">__init__</a></b> (<i>self</i>, QDomNamedNodeMap)</li><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#contains">contains</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />int <b><a href="qdomnamednodemap.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#isEmpty">isEmpty</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#item">item</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />unsigned long <b><a href="qdomnamednodemap.html#length">length</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#namedItem">namedItem</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a></b> (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>localName</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a></b> (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>localName</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a></b> (<i>self</i>, QDomNode&#160;<i>newNode</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a></b> (<i>self</i>, QDomNode&#160;<i>newNode</i>)</li><li><div class="fn" />int <b><a href="qdomnamednodemap.html#size">size</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#__eq__">__eq__</a></b> (<i>self</i>, QDomNamedNodeMap)</li><li><div class="fn" />bool <b><a href="qdomnamednodemap.html#__ne__">__ne__</a></b> (<i>self</i>, QDomNamedNodeMap)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.</p>
<p>Note that QDomNamedNodeMap does not inherit from <a href="qdomnodelist.html">QDomNodeList</a>. 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.</p>
<p>The QDomNamedNodeMap is used in three places:</p>
<ol type="1">
<li><a href="qdomdocumenttype.html#entities">QDomDocumentType.entities</a>() returns a map of all entities described in the DTD.</li>
<li><a href="qdomdocumenttype.html#notations">QDomDocumentType.notations</a>() returns a map of all notations described in the DTD.</li>
<li><a href="qdomnode.html#attributes">QDomNode.attributes</a>() returns a map of all attributes of an element.</li>
</ol>
<p>Items in the map are identified by the name which QDomNode.name() returns. Nodes are retrieved using <a href="qdomnamednodemap.html#namedItem">namedItem</a>(), <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>() or <a href="qdomnamednodemap.html#item">item</a>(). New nodes are inserted with <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>() or <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>() and removed with <a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a>() or <a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a>(). Use <a href="qdomnamednodemap.html#contains">contains</a>() to see if an item with the given name is in the named node map. The number of items is returned by <a href="qdomnamednodemap.html#length">length</a>().</p>
<p>Terminology: in this class we use "item" and "node" interchangeably.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDomNamedNodeMap" />QDomNamedNodeMap.__init__ (<i>self</i>)</h3><p>Constructs an empty named node map.</p>
<h3 class="fn"><a name="QDomNamedNodeMap-2" />QDomNamedNodeMap.__init__ (<i>self</i>, <a href="qdomnamednodemap.html">QDomNamedNodeMap</a>)</h3><p>Constructs a copy of <i>n</i>.</p>
<h3 class="fn"><a name="contains" />bool QDomNamedNodeMap.contains (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>name</i>)</h3><p>Returns true if the map contains a node called <i>name</i>; otherwise returns false.</p>
<h3 class="fn"><a name="count" />int QDomNamedNodeMap.count (<i>self</i>)</h3><p>This function is provided for Qt API consistency. It is equivalent to <a href="qdomnamednodemap.html#length">length</a>().</p>
<h3 class="fn"><a name="isEmpty" />bool QDomNamedNodeMap.isEmpty (<i>self</i>)</h3><p>Returns true if the map is empty; otherwise returns false. This function is provided for Qt API consistency.</p>
<h3 class="fn"><a name="item" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.item (<i>self</i>, int&#160;<i>index</i>)</h3><p>Retrieves the node at position <i>index</i>.</p>
<p>This can be used to iterate over the map. Note that the nodes in the map are ordered arbitrarily.</p>
<p>See also <a href="qdomnamednodemap.html#length">length</a>().</p>
<h3 class="fn"><a name="length" />unsigned long QDomNamedNodeMap.length (<i>self</i>)</h3><p>Returns the number of nodes in the map.</p>
<p>See also <a href="qdomnamednodemap.html#item">item</a>().</p>
<h3 class="fn"><a name="namedItem" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.namedItem (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>name</i>)</h3><p>Returns the node called <i>name</i>.</p>
<p>If the named node map does not contain such a node, a <a href="qdomnode.html#isNull">null node</a> is returned. A node's name is the name returned by <a href="qdomnode.html#nodeName">QDomNode.nodeName</a>().</p>
<p>See also <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>() and <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>().</p>
<h3 class="fn"><a name="namedItemNS" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.namedItemNS (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>nsURI</i>, <a href="qstring.html">QString</a>&#160;<i>localName</i>)</h3><p>Returns the node associated with the local name <i>localName</i> and the namespace URI <i>nsURI</i>.</p>
<p>If the map does not contain such a node, a <a href="qdomnode.html#isNull">null node</a> is returned.</p>
<p>See also <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>() and <a href="qdomnamednodemap.html#namedItem">namedItem</a>().</p>
<h3 class="fn"><a name="removeNamedItem" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.removeNamedItem (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>name</i>)</h3><p>Removes the node called <i>name</i> from the map.</p>
<p>The function returns the removed node or a <a href="qdomnode.html#isNull">null node</a> if the map did not contain a node called <i>name</i>.</p>
<p>See also <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>(), <a href="qdomnamednodemap.html#namedItem">namedItem</a>(), and <a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a>().</p>
<h3 class="fn"><a name="removeNamedItemNS" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.removeNamedItemNS (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>nsURI</i>, <a href="qstring.html">QString</a>&#160;<i>localName</i>)</h3><p>Removes the node with the local name <i>localName</i> and the namespace URI <i>nsURI</i> from the map.</p>
<p>The function returns the removed node or a <a href="qdomnode.html#isNull">null node</a> if the map did not contain a node with the local name <i>localName</i> and the namespace URI <i>nsURI</i>.</p>
<p>See also <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>(), <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>(), and <a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a>().</p>
<h3 class="fn"><a name="setNamedItem" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.setNamedItem (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newNode</i>)</h3><p>Inserts the node <i>newNode</i> into the named node map. The name used by the map is the node name of <i>newNode</i> as returned by <a href="qdomnode.html#nodeName">QDomNode.nodeName</a>().</p>
<p>If the new node replaces an existing node, i.e. the map contains a node with the same name, the replaced node is returned.</p>
<p>See also <a href="qdomnamednodemap.html#namedItem">namedItem</a>(), <a href="qdomnamednodemap.html#removeNamedItem">removeNamedItem</a>(), and <a href="qdomnamednodemap.html#setNamedItemNS">setNamedItemNS</a>().</p>
<h3 class="fn"><a name="setNamedItemNS" /><a href="qdomnode.html">QDomNode</a> QDomNamedNodeMap.setNamedItemNS (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newNode</i>)</h3><p>Inserts the node <i>newNode</i> 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 <i>newNode</i>. If the new node replaces an existing node, the replaced node is returned.</p>
<p>See also <a href="qdomnamednodemap.html#namedItemNS">namedItemNS</a>(), <a href="qdomnamednodemap.html#removeNamedItemNS">removeNamedItemNS</a>(), and <a href="qdomnamednodemap.html#setNamedItem">setNamedItem</a>().</p>
<h3 class="fn"><a name="size" />int QDomNamedNodeMap.size (<i>self</i>)</h3><p>This function is provided for Qt API consistency. It is equivalent to <a href="qdomnamednodemap.html#length">length</a>().</p>
<h3 class="fn"><a name="__eq__" />bool QDomNamedNodeMap.__eq__ (<i>self</i>, <a href="qdomnamednodemap.html">QDomNamedNodeMap</a>)</h3><h3 class="fn"><a name="__ne__" />bool QDomNamedNodeMap.__ne__ (<i>self</i>, <a href="qdomnamednodemap.html">QDomNamedNodeMap</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>