#include "TextNode.h" namespace xml { TextNode::TextNode(const std::string& initialText) : Node(nodeText) , text(initialText) { } TextNode::~TextNode() { } std::istream& TextNode::load(std::istream& in) { for ( char ch = in.get(); in && ch != '<'; ch = in.get() ) text += ch; in.unget(); return in; } std::ostream& TextNode::print(std::ostream& out, int depth) const { return Util::tabs(out, depth) << text << std::endl; } } // namespace xml