#include <XMLFileOutput.h>
Public Member Functions | |
XMLOutputFile (const Char *enc=NULL) | |
Constructor. | |
XMLOutputFile (XMLElement *root_elem, const Char *enc=DefaultEncoding) | |
Constructor. | |
~XMLOutputFile (void) | |
Destructor. | |
bool | Write (OStream &stream) const |
Write data to the output stream. | |
bool | Write (String file_name) const |
Write data to given external file. | |
void | SetRootNode (XMLElement *elem) |
Set root node to given node. | |
void | ClearRootNode (void) |
Remove root node and free used memory. | |
String | GetEncoding (void) const |
Get character encoding of the output. | |
Private Attributes | |
XMLElement * | root_node |
Root node of the file. | |
String | encoding |
Encoding. |
hwdet::XMLOutputFile::XMLOutputFile | ( | const Char * | enc = NULL |
) | [inline] |
Constructor.
Create XML file with given encoding.
enc | Encoding of the file. If NULL, no encoding information is written to the output file. |
hwdet::XMLOutputFile::XMLOutputFile | ( | XMLElement * | root_elem, | |
const Char * | enc = DefaultEncoding | |||
) | [inline] |
Constructor.
Create XML file with given encoding and root node.
enc | Encoding of the file. | |
root_elem | Root node of the file. |
hwdet::XMLOutputFile::~XMLOutputFile | ( | void | ) | [inline] |
Destructor.
Memory used by the root node of the XML file is NOT freed.
void hwdet::XMLOutputFile::ClearRootNode | ( | void | ) | [inline] |
Remove root node and free used memory.
String hwdet::XMLOutputFile::GetEncoding | ( | void | ) | const [inline] |
Get character encoding of the output.
void hwdet::XMLOutputFile::SetRootNode | ( | XMLElement * | elem | ) | [inline] |
Set root node to given node.
elem | New root node of the file. |
bool hwdet::XMLOutputFile::Write | ( | String | file_name | ) | const [inline] |
Write data to given external file.
file_name | Name of file to which data should be written. File will be created it it does not exists. Existing file will be overwritten. |
true
if successfull, false
otherwise. bool hwdet::XMLOutputFile::Write | ( | OStream & | stream | ) | const [inline] |
Write data to the output stream.
stream | Stream to which file will be written. |
true
if successfull, false
otherwise.
String hwdet::XMLOutputFile::encoding [private] |
Encoding.
XMLElement* hwdet::XMLOutputFile::root_node [private] |
Root node of the file.