test/systemtests/parse_logs.cpp
// mapping's core system does not require an XML library, and we do not
// want to introduce another dependency just for a testcase helper binary.
// Instead, we're using the good old XML-via-concatenation approach.

mapping's core system does not require an XML library, and we do not
want to introduce another dependency just for a testcase helper binary.
Instead, we're using the good old XML-via-concatenation approach.
mapping ' s core system does not require an XML library and we do not want to introduce another dependency just for a testcase helper binary . Instead we ' re using the good old XML - via - concatenation approach .
static void encodeXML(std::string &out, const std::string &in) {
	for(size_t pos = 0; pos != in.size(); pos++) {
		switch(in[pos]) {
				case '&':  out.append("&amp;");       break;
				case '\"': out.append("&quot;");      break;
				case '\'': out.append("&apos;");      break;
				case '<':  out.append("&lt;");        break;
				case '>':  out.append("&gt;");        break;
				default:   out.append(&in[pos], 1); break;
		}
	}
}
static void encodeXML ( std :: string & out , const std :: string & in ) { for ( size_t pos = 0 ; pos != in . size ( ) ; pos ++ ) { switch ( in [ pos ] ) { case ' ' : out . append ( " " ) ; break ; case ' \" ' : out . append ( " " ) ; break ; case ' \' ' : out . append ( " " ) ; break ; case ' ' : out . append ( " " ) ; break ; case ' ' : out . append ( " " ) ; break ; default : out . append ( & in [ pos ] , 1 ) ; break ; } } }
mapping's core system does not require an XML library, and we do not
want to introduce another dependency just for a testcase helper binary.
mapping ' s core system does not require an XML library and we do not want to introduce another dependency just for a testcase helper binary .