QXmppElement Class
| Header: | #include <QXmppElement.h> |
Public Functions
| QXmppElement() | |
| QXmppElement(const QDomElement &element) | |
| QXmppElement(const QXmppElement &other) | |
| void | appendChild(const QXmppElement &child) |
| QString | attribute(const QString &name) const |
| QStringList | attributeNames() const |
| QXmppElement | firstChildElement(const QString &name = QString()) const |
| bool | isNull() const |
| QXmppElement | nextSiblingElement(const QString &name = QString()) const |
| void | removeChild(const QXmppElement &child) |
| void | setAttribute(const QString &name, const QString &value) |
| void | setTagName(const QString &tagName) |
| void | setValue(const QString &value) |
| QDomElement | sourceDomElement() const |
| QString | tagName() const |
| void | toXml(QXmlStreamWriter *writer) const |
| QString | value() const |
| QXmppElement & | operator=(const QXmppElement &other) |
Detailed Description
QXmppElement represents a raw XML element with possible children.
Member Function Documentation
QXmppElement::QXmppElement()
Default constructor
QXmppElement::QXmppElement(const QDomElement &element)
Copy-construct DOM element contents
QXmppElement::QXmppElement(const QXmppElement &other)
Copy constructor
void QXmppElement::appendChild(const QXmppElement &child)
Adds a child element
QString QXmppElement::attribute(const QString &name) const
Returns an attribute by name
See also setAttribute().
QStringList QXmppElement::attributeNames() const
Returns the list of attributes
QXmppElement QXmppElement::firstChildElement(const QString &name = QString()) const
Returns the first child element with the given name or the first child element if the given name is empty.
bool QXmppElement::isNull() const
Returns true if the element is null
QXmppElement QXmppElement::nextSiblingElement(const QString &name = QString()) const
Returns the next sibling element with the given name or the next sibling element if the given name is empty.
name.
void QXmppElement::removeChild(const QXmppElement &child)
Removes a child element
void QXmppElement::setAttribute(const QString &name, const QString &value)
Sets an attribute
name and value.
See also attribute().
void QXmppElement::setTagName(const QString &tagName)
Sets the tag name of the element
tagName.
See also tagName().
void QXmppElement::setValue(const QString &value)
Sets the text content of the element
value.
See also value().
QDomElement QXmppElement::sourceDomElement() const
Creates a DOM element from the source element
The source DOM element is saved as XML and needs to be parsed again in this step.
QString QXmppElement::tagName() const
Returns the tag name of the element
See also setTagName().
void QXmppElement::toXml(QXmlStreamWriter *writer) const
Serializes the element to XML
writer.
QString QXmppElement::value() const
Returns the text content of the element
See also setValue().
QXmppElement &QXmppElement::operator=(const QXmppElement &other)
Assignment operator, copying other.