Ananas Library  0.9.5
Public Slots | Public Member Functions | List of all members
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 ( )

Create object.

AExtXML::~AExtXML ( )

Destroy object.

Member Function Documentation

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

Returns current node's attribute value.

Parameters
name(in) - attribute name.
Returns
attribute value.
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.
bool AExtXML::isRoot ( )
slot

Check current node is root node.

Returns
true if current node is root.
bool AExtXML::read ( const QString &  fname)
slot

Reads XML from file.

Parameters
fname(in) - name of XML file.
Returns
true if OK.
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.
bool AExtXML::setText ( const QString &  text)
slot

Sets text for current node.

Parameters
text(in) - new text value.
Returns
void.
QString AExtXML::text ( ) const
slot

Returns text of current node.

Returns
string.
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: