Ananas Library 0.9.5
AExtXML Class Reference

The AExtXML is Ananas extension class for work with XML files. . More...

#include <aextxml.h>

Inheritance diagram for AExtXML:
AExtension

Public Slots

bool read (const QString &fname)
bool write (const QString &fname)
void createNew (const QString &rootnodename)
bool isRoot ()
bool parent ()
bool newChild (const QString &childname)
QString nodeName ()
bool setText (const QString &text)
QString text () const
bool setAttr (const QString &name, const QString &value)
QString attr (const QString &name) const
bool removeAttr (const QString &name)
bool firstChild ()
bool lastChild ()
bool next ()
bool prev ()
bool childExists ()

Public Member Functions

 AExtXML ()
 ~AExtXML ()
Public Member Functions inherited from AExtension
 AExtension (const char *name=0)
virtual int init (aDatabase *dbo)

Additional Inherited Members

Signals inherited from AExtension
void event (const QString &data)
Public Attributes inherited from AExtension
aDatabasedb

Detailed Description

The AExtXML is Ananas extension class for work with XML files. .

Class for work with extensions

Constructor & Destructor Documentation

◆ AExtXML()

AExtXML::AExtXML ( )

Create object.

◆ ~AExtXML()

AExtXML::~AExtXML ( )

Destroy object.

Member Function Documentation

◆ attr

QString AExtXML::attr ( const QString & name) const
slot

Returns current node's attribute value.

Parameters
name(in) - attribute name.
Returns
attribute value.

◆ childExists

bool AExtXML::childExists ( )
slot

◆ createNew

void AExtXML::createNew ( const QString & rootnodename)
slot

Create new XML document. Old document content will be destroyed.

Parameters
rootnodename(in) - new XML docemrnt root node name.
Returns
void.

◆ firstChild

bool AExtXML::firstChild ( )
slot

◆ isRoot

bool AExtXML::isRoot ( )
slot

Check current node is root node.

Returns
true if current node is root.

◆ lastChild

bool AExtXML::lastChild ( )
slot

◆ newChild

bool AExtXML::newChild ( const QString & childname)
slot

◆ next

bool AExtXML::next ( )
slot

◆ nodeName

QString AExtXML::nodeName ( )
slot

◆ parent

bool AExtXML::parent ( )
slot

◆ prev

bool AExtXML::prev ( )
slot

◆ read

bool AExtXML::read ( const QString & fname)
slot

Reads XML from file.

Parameters
fname(in) - name of XML file.
Returns
true if OK.

◆ removeAttr

bool AExtXML::removeAttr ( const QString & name)
slot

◆ setAttr

bool AExtXML::setAttr ( const QString & name,
const QString & value )
slot

Sets current node's attribute value.

Parameters
name(in) - attribute's name.
value(in) - new value.
Returns
void.

◆ setText

bool AExtXML::setText ( const QString & text)
slot

Sets text for current node.

Parameters
text(in) - new text value.
Returns
void.

References text().

◆ text

QString AExtXML::text ( ) const
slot

Returns text of current node.

Returns
string.

Referenced by setText().

◆ write

bool AExtXML::write ( const QString & fname)
slot

Writes XML file.

Parameters
fname(in) - name of XML file.
Returns
error code.

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