gSAFE
1.3.8
|
#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) |
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
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.
void HXmlWriter::beginNode | ( | QString | n, |
QString | parameters = "" |
||
) |
Creates an ordinary XML node. (On closing the node name is automatically written)
n | the name of the node |
parameters | is a string which can optionally contain parameters |
Definition at line 353 of file datalib.cpp.
void HXmlWriter::endNode | ( | void | ) |
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)
n | the name of the node |
data | the character data |
parameters | is 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.)
n | the name of the node |
parameters | is 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.
enc | encoding |
nullhead | if 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)
data | is 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.