void ParseXML::chars(const char* text, int textlen) { // The text is not zero terminated; thus we need the length: string str(text, textlen); // The text is likely to have trailing white space, e.g. newline, etc stripTrailWhiteSpace(str); if (str.size()) xmlData.insert(std::pair<string, string>(makeTag(), str)); }
void ParseXML::chars(void *, const char *text, int textlen) { // The text is not zero terminated; thus we need the length: std::string str(text, textlen); // The text is loaded with white space: stripTrailWhiteSpace(str); if (str.size()) { if (handle) (*handle)(str); } }