Initializes the writer and opens the root element/container identified by the given key
| 36 | |
| 37 | /// Initializes the writer and opens the root element/container identified by the given key |
| 38 | BOOL ValidateXmlWriter::open(const std::string& key) { |
| 39 | if (file == nullptr) return FALSE; |
| 40 | |
| 41 | stream.str(""); |
| 42 | stream.clear(); |
| 43 | |
| 44 | indent = 0; |
| 45 | stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; |
| 46 | printIndent(stream); |
| 47 | stream << "<" << key << ">\n"; |
| 48 | indent++; |
| 49 | |
| 50 | return TRUE; |
| 51 | } |
| 52 | |
| 53 | /// Begins a new structured section identified by the given key and makes it the current write context |
| 54 | BOOL ValidateXmlWriter::begin(const std::string& key, ContainerType type) { |