string::size_type	entity_name_len = s.find_last_not_of("; \t\r\n", pos) -pos ;
string::size_type	entity_name_len = s.find_first_of("; \t\r\n", pos) -pos -1;   assert(s[pos+entity_name_len+1]==';');
static	string	decode_entity(string &s,std::size_t &pos){	std::size_t			old_pos = pos;	string::size_type	entity_name_len = s.find_last_not_of("; \t\r\n", pos) -pos ;	string				entity_name = s.substr(pos+1, entity_name_len);		pos += entity_name_len + 2;		if(s == "amp")		return string("&");	else	if(s == "apos")		return string("'");	else	if(s == "quot")		return string("\"");	else	if(s == "lt")		return string("<");	else	if(s == "gt")		return string(">");		return s.substr(old_pos, entity_name_len+2);}