in PollyTTSEngine/PollyManager.cpp [124:149]
std::string PollyManager::ParseXMLOutput(std::string &xmlBuffer)
{
bool copy = true;
std::string plainString;
std::stringstream convertStream;
// remove all xml tags
for (char i : xmlBuffer)
{
convertStream << i;
if (convertStream.str() == "<") copy = false;
else if (convertStream.str().compare(">") == 0)
{
copy = true;
convertStream.str(std::string());
continue;
}
if (copy) plainString.append(convertStream.str());
convertStream.str(std::string());
}
return plainString;
}