The start of the CDATA section triggers the CdataStart handler, the end the CdataEnd handler, and the content is caught by the Char handler. So all you need is to set a flag when the CDATA section starts, then capture characters while the flag is set, then unset the flag at the end of the section.
Now for some unwanted advice:
- CDATA sections are just syntactic sugar, a shortcut to avoid escaping too many >'s and &'s. They are never garanteed to be there, you just cannot enforce it. So relying on a CDATA section being present is a little dangerous.
- If you are just starting with a project, you probably shouldn't be using XML::Parser. It is an old module, and its API is not standard at all. If you can install it, XML::LibXML is most likely a better choice: it is faster and way, WAY more powerful. Or of course XML::Twig ;--)