![]() ![]() |
The QDomElement class represents one Element in the DOM tree. More...
#include <qdom.h>
Inherits QDomNode.
The QDomElement class is a representation for XML elements in the DOM tree. 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. Setting is done with the setAttribute() and setAttributeNode() methods.
For further information about the Document Objct Model see http://www.w3.org/TR/REC-DOM-Level-1/ . For a more general introduction into the internals of the DOM implementation see the QDomDocument documentation.
Constructs a null Element. Use the QDomDocument::createElement() function to construct elements with contents.
Copy constructor.
Destructor.
returns the attribute with 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 name name. If no such attribute exists a null object is returned.
See also: setAttributeNode(), attribute() and setAttribute().
[virtual]
returns a QDomNodeList containing all child elements of this element with the tag name tagname.
Returns TRUE is this element has an attribute with the name name.
[virtual]
Returns true.
Reimplemented from QDomNode.
[virtual]
Returns QDomNode::ElementNode.
See also: QDomNode::nodeType().
Reimplemented from QDomNode.
Calling normalize() on an element brings all its children into a standard form. This mainly means, that adjacent QDomText objects will be merged to one text object.
assignment operator.
removes the attribute with name name from this element.
/sa setAttribute() attribute().
removes the attribute oldAttr points to, 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 same name as newAttr existed in the element it is returned, or otherwise a null attribute.
See also: attributeNode().
function to set the tag name of this element.
See also: tagName().
Returns the tag name of this element. For an XML element as
<img src="myimg.pmg">
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>
If this QDomElement represents the
Comments are ignored by this method. 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.0-beta2
|