Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经多次查看 Poco SAX 解析器头文件,但似乎找不到任何有关如何获取元素内部文本的信息。例如:
<description>This is the inner text.</description>
谁能指出我正确的方向?
好的,自己找到了解决方案。我需要像这样实现“字符”方法:
void MyParser::characters(const Poco::XML::XMLChar ch[], int start, int length) { std::string innerText = std::string(ch + start, length); }