gSAFE  1.3.8
Public Member Functions | List of all members
HXmlWriter Class Reference

#include <datalib.h>

Public Member Functions

 HXmlWriter (void)
 
 ~HXmlWriter (void)
 
void beginNode (QString n, QString parameters="")
 
void endNode (void)
 
QTextStream * getStream (void)
 
void putCData (QString n, QString data, QString parameters="")
 
void putEmptyNode (QString n, QString parameters="")
 
void putHead (QString enc, bool nullhead=false)
 
void putRawData (QString data)
 
QByteArray recodeData (QString d)
 
QByteArray recodeDataNoconvert (QString d)
 
void setStream (QTextStream *oo)
 

Detailed Description

XML data generator class. Write XML nodes, maintain the node stack, take care of coding etc... This class is help to write well formed (and good looking) xml data

Definition at line 124 of file datalib.h.

Constructor & Destructor Documentation

HXmlWriter::HXmlWriter ( void  )

Create a simple HXmlWriter class

Definition at line 299 of file datalib.cpp.

HXmlWriter::~HXmlWriter ( void  )

Destructor

Definition at line 309 of file datalib.cpp.

Member Function Documentation

void HXmlWriter::beginNode ( QString  n,
QString  parameters = "" 
)

Creates an ordinary XML node. (On closing the node name is automatically written)

Parameters
nthe name of the node
parametersis a string which can optionally contain parameters
See Also
endNode()

Definition at line 353 of file datalib.cpp.

void HXmlWriter::endNode ( void  )

Closes the current node.

See Also
beginNode()

Definition at line 361 of file datalib.cpp.

QTextStream * HXmlWriter::getStream ( void  )

Returns that TextStrem-object which the XML data is written

Definition at line 315 of file datalib.cpp.

void HXmlWriter::putCData ( QString  n,
QString  data,
QString  parameters = "" 
)

Creates a node contains character data (Opens it, fill and close)

Parameters
nthe name of the node
datathe character data
parametersis a string which can optionally contain parameters

Definition at line 366 of file datalib.cpp.

void HXmlWriter::putEmptyNode ( QString  n,
QString  parameters = "" 
)

Creates an empty node without content (This is not an open and a close node. It's a single node.)

Parameters
nthe name of the node
parametersis a string which can optionally contain parameters

Definition at line 374 of file datalib.cpp.

void HXmlWriter::putHead ( QString  enc,
bool  nullhead = false 
)

Creates the XML header.

Parameters
encencoding
nullheadif nullhead is true the xml header is skipped.

Definition at line 325 of file datalib.cpp.

void HXmlWriter::putRawData ( QString  data)

Writes a string to the stream without any format or processing (It can contains xml data too)

Parameters
datais the content to write

Definition at line 382 of file datalib.cpp.

QByteArray HXmlWriter::recodeData ( QString  d)

Recodes the input string to QByteArray (with the defined encoding) The & sing is will be replaced to &

Definition at line 387 of file datalib.cpp.

QByteArray HXmlWriter::recodeDataNoconvert ( QString  d)

Recodes the input string to QByteArray (with the defined encoding) The & sing is will untouched

Definition at line 392 of file datalib.cpp.

void HXmlWriter::setStream ( QTextStream *  oo)

Sets the TextStream-object which the XML data is written

Definition at line 320 of file datalib.cpp.


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