#include <xmlwriter.h>
Public Member Functions | |
| XMLWriter (const std::string &sEncoding=DEFAULT_ENCODING) | |
| Constructor. | |
| ~XMLWriter () | |
| Destructor. | |
| void | startDocument () throw (XMLWritingException) |
| Starts the XML document. | |
| void | addElement (const std::string &name, const std::string &value) |
| Adds a element to the xml document. | |
| void | addElement (const std::string &name, const std::string &value, const AttributesImpl &atts) |
| Adds a element to the xml document. | |
| void | startElement (const std::string &name, bool bEndLine=true) |
| Starts a new element. | |
| void | startElement (const std::string &name, const AttributesImpl &atts, bool bEndLine=true) |
| Starts a new element. | |
| void | endElement (const std::string &name) |
| Ends a element. | |
| void | endDocument () |
| Ends XML document. | |
| std::string | getEncoding () const |
| Returns the characters encoding charset. | |
| void | setEncoding (const std::string &charset) |
| Sets the characters encoding charset. | |
| void | setRootNode (const std::string &sRootNode) |
| Sets the root node. | |
| std::string | getRootNode () const |
| Returns the root node. | |
| std::string | getXMLDocument () const |
| Returns the XML document as string. | |
Static Public Attributes | |
| static const char * | DEFAULT_ENCODING = "ISO-8859-15" |
| Default encoding used : ISO-8859-15. | |
It only provides a interface for writing XML document, it doesn't provdies an interface for verifying the document. It's possible to produce a non valid document if it is not correctly used.
Yves Houpert <yves.houpert@insa-rouen.fr>
|
|
Constructor.
|
|
||||||||||||||||
|
Adds a element to the xml document.
|
|
||||||||||||
|
Adds a element to the xml document.
|
|
|
Ends XML document. It closes the root node tag. |
|
|
Ends a element.
|
|
|
Returns the characters encoding charset.
|
|
|
Returns the root node.
|
|
|
Returns the XML document as string.
|
|
|
Sets the characters encoding charset.
|
|
|
Sets the root node.
|
|
|
Starts the XML document. It writes the xml tag and the root node. This one should be sent, otherwise, it throws a XMLWritingException.
|
|
||||||||||||||||
|
Starts a new element.
|
|
||||||||||||
|
Starts a new element.
|
1.4.6