The QDomElement class represents one element in the DOM tree. More...
#include <qdom.h>
Inherits QDomNode.
Elements have a name() and zero or more attributes associated with them.
Attributes of the element are represented by QDomAttr objects, that can be queried using the attribute() and attributeNode() functions. You can set attributes with the setAttribute() and setAttributeNode() functions.
For further information about the Document Objct Model see http://www.w3.org/TR/REC-DOM-Level-1/. For a more general introduction of the DOM implementation see the QDomDocument documentation.
Constructs an empty element. Use the QDomDocument::createElement() function to construct elements with content.
Copy constructor.
The data of the copy is shared: modifying one will also change the other. If you want to make a real copy, use cloneNode() instead.
Destructor.
Returns the attribute with the name name. If the attribute does not exist defValue is returned.
See also setAttribute(), attributeNode() and setAttributeNode().
Returns the QDomAttr object that corresponds to the attribute with the name name. If no such attribute exists a null object is returned.
See also setAttributeNode(), attribute() and setAttribute().
[virtual]
Returns a QDomNamedNodeMap containing all attributes for this element.
See also attribute(), setAttribute(), attributeNode() and setAttributeNode().
Reimplemented from QDomNode.
[virtual]
Returns a QDomNodeList containing all child elements of this element with the name tagname.
Returns TRUE is this element has an attribute with the name name, otherwise FALSE.
[virtual]
Returns TRUE.
Reimplemented from QDomNode.
[virtual]
Returns ElementNode.
Reimplemented from QDomNode.
Calling normalize() on an element brings all its children into a standard form. This means, that adjacent QDomText objects will be merged to one text object (QDomCDATASection nodes are not merged).
Assignment operator.
The data of the copy is shared: modifying one will also change the other. If you want to make a real copy, use cloneNode() instead.
Removes the attribute with the name name from this element.
See also setAttribute() and attribute().
Removes the attribute oldAttr from the element and returns it.
See also attributeNode() and setAttributeNode().
Sets the attribute with the name name to the string value. If the attribute does not exist, a new one is created.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Adds the attribute newAttr to this element.
If an attribute with the name newAttr exists in the element, the function returns this attribute; otherwise the function returns a null attribute.
See also attributeNode().
Sets the tag name of this element.
See also tagName().
Returns the tag name of this element. For an XML element like
<img src="myimg.png">
the tagname would return "img".
See also setTagName().
Returns the text contained inside this element.
Example:
<h1>Hello <b>Qt</b> <![CDATA[<xml is cool>]]></h1>
The function text() of the QDomElement for the <h1> tag, will return "Hello Qt <xml is cool>".
Comments are ignored by this function. It evaluates only QDomText and QDomCDATASection objects.
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright İ 2000 Trolltech | Trademarks | Qt version 2.2.1
|