#include "Util.h" namespace xml { std::ostream& Util::tabs(std::ostream& out, int count, const std::string& tab) { for ( int i = 0; i < count; ++i ) out << tab; return out; } std::string Util::nextToken(std::istream& in) { std::string result; // Ignore whitespace before the next token while ( isspace(in.peek()) ) in.get(); // Retrieve characteres until find a separator: whitespace or '>' for ( char ch = in.get(); in; ch = in.get() ) { if ( isspace(ch) || ch == '>' ) return result; result += ch; } return result; } } // namespace xml