Go Premium for a chance to win a PS4. Enter to Win


Parse CDATA section in C++ using SAX

Posted on 2004-10-22
Medium Priority
Last Modified: 2012-08-14
I am trying to parse CDATA section in my xml file using c++ and SAX parser.
Somehow it skipping the CDATA tag completely and I am unable to parse it.
Could you send me the snippet of code or so?
Question by:pb_india
LVL 86

Assisted Solution

jkr earned 400 total points
ID: 12384094
Are you using SAX 1.0? SAX2 seems to be able to do that - see http://lists.xml.org/archives/xml-dev/199912/msg00232.html

Author Comment

ID: 12384144
using SAX2
But its still skiping the the element CDATA

I wan tto know if I am setting the flags right
LVL 12

Accepted Solution

OnegaZhang earned 1200 total points
ID: 12392175
there is virtual void       startCDATA ()=0 in LexicalHandler Class of  Xerces-C++ library.

welcome to www.fruitfruit.com
LVL 17

Assisted Solution

rstaveley earned 400 total points
ID: 12408740
I'd expect the data to appear as characters data without the CDATA escape characters. Are you not getting the CDATA content? If not, you might want to check that you've got the escape sequence right. Try looking at the XML document in IE to check its well-formedness.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question