Re: Parsing CDATA section

"Bob Lee" <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
CdataSectionHandler just tells you when the section starts and ends. I
assume you need to use CharacterDataHandler to get the actual text.

Bob

On 5/27/07, Ramprasad B <[email protected]> wrote:
>
> Here's my code:
>
> static void XMLCALL
> startcData(void *userData){
>   int *depthPtr = (int *)userData;
>   /*I am unable to get cdata here. userData contains a single byte here*/
> }
>
> static void XMLCALL
> endcData(void *userData){
>     ;
> }
>
> int main(){
>   XML_SetCdataSectionHandler(parser, startcData, endcData);
> }
>
> XML file:
>
> <A>
>   <B>
>     <C><![CDATA[Hello World]]></C>
>   </B>
> </A>
>
> I see that when the CDATA section starts, the startcData fucntion is
> called.
>
> It's still not working ! BTW, which ptr points to CDATA section when the
> startcData is called ?
>
> Thanks !
> -
> Ramprasad B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.