QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QXmppElement Class Reference

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
 
QXmppElementoperator= (const QXmppElement &other)
 

Detailed Description

QXmppElement represents a raw XML element with possible children.

Constructor & Destructor Documentation

◆ QXmppElement() [1/3]

QXmppElement::QXmppElement ( )

Default constructor

◆ QXmppElement() [2/3]

QXmppElement::QXmppElement ( const QXmppElement other)

Copy constructor

◆ QXmppElement() [3/3]

QXmppElement::QXmppElement ( const QDomElement &  element)

Copy-construct DOM element contents

Member Function Documentation

◆ appendChild()

void QXmppElement::appendChild ( const QXmppElement child)

Adds a child element

◆ attribute()

QString QXmppElement::attribute ( const QString &  name) const

Returns an attribute by name

◆ attributeNames()

QStringList QXmppElement::attributeNames ( ) const

Returns the list of attributes

◆ firstChildElement()

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.

◆ isNull()

bool QXmppElement::isNull ( ) const

Returns true if the element is null

◆ nextSiblingElement()

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.

◆ operator=()

QXmppElement & QXmppElement::operator= ( const QXmppElement other)

Assignment operator

◆ removeChild()

void QXmppElement::removeChild ( const QXmppElement child)

Removes a child element

◆ setAttribute()

void QXmppElement::setAttribute ( const QString &  name,
const QString &  value 
)

Sets an attribute

◆ setTagName()

void QXmppElement::setTagName ( const QString &  tagName)

Sets the tag name of the element

◆ setValue()

void QXmppElement::setValue ( const QString &  value)

Sets the text content of the element

◆ sourceDomElement()

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.

◆ tagName()

QString QXmppElement::tagName ( ) const

Returns the tag name of the element

◆ toXml()

void QXmppElement::toXml ( QXmlStreamWriter *  writer) const

Serializes the element to XML

◆ value()

QString QXmppElement::value ( ) const

Returns the text content of the element


The documentation for this class was generated from the following files: