tags:

views:

352

answers:

1

I've been going over the Poco SAX parser header files a few times but I can't seem to find any info on how to obtain an element's inner text. For example:

<description>This is the inner text.</description>

Can anyone point me in the right direction?

A: 

Ok, found the solution myself. I needed to use implement the 'characters' method like this:

void MyParser::characters(const Poco::XML::XMLChar ch[], int start, int length)
{
  std::string innerText = std::string(ch + start, length);
}
StackedCrooked