#include "XmlDocument.h" #include "Element.h" namespace xml { Document::Document() : root(NULL) { } Document::~Document() { delete root; } std::istream& Document::load(std::istream& in) { std::string token = Util::nextToken(in); delete root; root = new Element(token); in >> *root; return in; } std::ostream& Document::print(std::ostream& out) const { return out << *root; } } // namespace xml