QXmpp Version: 1.10.0
|
Public Member Functions | |
QXmppElement () | |
QXmppElement (const QXmppElement &other) | |
QXmppElement (const QDomElement &element) | |
QDomElement | sourceDomElement () const |
QStringList | attributeNames () const |
QString | attribute (const QString &name) const |
void | setAttribute (const QString &name, const QString &value) |
void | appendChild (const QXmppElement &child) |
QXmppElement | firstChildElement (const QString &name=QString()) const |
QXmppElement | nextSiblingElement (const QString &name=QString()) const |
void | removeChild (const QXmppElement &child) |
QString | tagName () const |
void | setTagName (const QString &type) |
QString | value () const |
void | setValue (const QString &text) |
bool | isNull () const |
void | toXml (QXmlStreamWriter *writer) const |
QXmppElement & | operator= (const QXmppElement &other) |
QXmppElement represents a raw XML element with possible children.
QXmppElement::QXmppElement | ( | ) |
Default constructor
QXmppElement::QXmppElement | ( | const QXmppElement & | other | ) |
Copy constructor
QXmppElement::QXmppElement | ( | const QDomElement & | element | ) |
Copy-construct DOM element contents
void QXmppElement::appendChild | ( | const QXmppElement & | child | ) |
Adds a child element
QString QXmppElement::attribute | ( | const QString & | name | ) | const |
Returns an attribute by name
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.
QXmppElement & QXmppElement::operator= | ( | const QXmppElement & | other | ) |
Assignment operator
void QXmppElement::removeChild | ( | const QXmppElement & | child | ) |
Removes a child element
void QXmppElement::setAttribute | ( | const QString & | name, |
const QString & | value | ||
) |
Sets an attribute
void QXmppElement::setTagName | ( | const QString & | tagName | ) |
Sets the tag name of the element
void QXmppElement::setValue | ( | const QString & | value | ) |
Sets the text content of the element
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
void QXmppElement::toXml | ( | QXmlStreamWriter * | writer | ) | const |
Serializes the element to XML
QString QXmppElement::value | ( | ) | const |
Returns the text content of the element