#include <sstream>
#include "xmlwriter.hpp"
-XmlWriter::XmlWriter(std::ostream& outstream)
- : out(outstream), indent(0)
+XmlWriter::XmlWriter(std::ostream& outstream) :
+ out(outstream),
+ indent(0),
+ closetag(),
+ lasttag(),
+ sections()
{
}
const std::string& lastsection = sections.back();
if (lastsection != name) {
std::ostringstream msg;
- msg << "mismtach in open/closeSection. Expected '"
+ msg << "mismatch in open/closeSection. Expected '"
<< lastsection << "' got '" << name << "'";
throw std::runtime_error(msg.str());
}