#include <XMLDocument.h>
processing instructions, ENTITY references, etc), then a root tag XMLObject.
Definition at line 32 of file XMLDocument.h.
Public Member Functions | |
| XMLDocument () | |
| Default constructor. | |
| ~XMLDocument () | |
| Destructor. | |
| void | set_root (XMLObject *root) |
| Set the root tag. | |
| void | add_header (const char *text, size_t len=0) |
| Append some header data. | |
| void | to_string (StringBuffer *buf, int indent) const |
| Generate formatted XML text and put it into the given buffer. | |
| const std::string | header () const |
| Accessors. | |
| const XMLObject * | root () const |
| Accessors. | |
Protected Member Functions | |
| NO_ASSIGN (XMLDocument) | |
Protected Attributes | |
| std::string | header_ |
| XMLObject * | root_ |
| oasys::XMLDocument::XMLDocument | ( | ) |
| oasys::XMLDocument::~XMLDocument | ( | ) |
| const std::string oasys::XMLDocument::header | ( | ) | const [inline] |
| const XMLObject* oasys::XMLDocument::root | ( | ) | const [inline] |
| void oasys::XMLDocument::set_root | ( | XMLObject * | root | ) |
Set the root tag.
Assumes ownership of the object.
Definition at line 49 of file XMLDocument.cc.
References ASSERT, root(), and root_.
Referenced by oasys::ExpatXMLParser::start_element(), and oasys::XMLMarshal::XMLMarshal().
| void oasys::XMLDocument::add_header | ( | const char * | text, | |
| size_t | len = 0 | |||
| ) |
| void oasys::XMLDocument::to_string | ( | StringBuffer * | buf, | |
| int | indent | |||
| ) | const |
Generate formatted XML text and put it into the given buffer.
| indent | The number of spaces to indent for subelements. |
Definition at line 57 of file XMLDocument.cc.
References oasys::StringBuffer::append(), header_, root_, and oasys::XMLObject::to_string().
Referenced by oasys::XMLMarshal::end_action().
| oasys::XMLDocument::NO_ASSIGN | ( | XMLDocument | ) | [protected] |
std::string oasys::XMLDocument::header_ [protected] |
XMLObject* oasys::XMLDocument::root_ [protected] |
Definition at line 68 of file XMLDocument.h.
Referenced by root(), set_root(), to_string(), and ~XMLDocument().
1.5.1