Xerces XML DOM CDATA?

I'm trying to parse the folowing xml data with Xerces:

<?xml version='1.0' encoding='UTF-8'?>

<edit src="test.html">

<![CDATA[

some html code stuff..

]]>

</edit>

I can get to the src attribute, but I don't seem to get to the CDATA section. Also, examples for this are not really to be found anywhere... So if someone could help, it would be great.

code

PrintWriter out = response.getWriter();

boolean error =false;

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

Document dom;

try{

DocumentBuilder db = dbf.newDocumentBuilder();

dom = db.parse(request.getInputStream());

String src = dom.getElementsByTagName("edit").item(0)).getAttribute("src").getNodeValue() ;

String content =/// how do I do this...

out.println("src: "+src);

out.println("content:" +content);

}catch(Exception pce){

out.println("ERROR: " +pce.getMessage());

error =true;

}

if(!error){

out.println("OK");

}

[1712 byte] By [deepspacea] at [2007-10-2 9:47:50]
# 1
Hmm, fiddles arround a bit, and found a solution for myself :)
deepspacea at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Why don't you do a service to the other people who may actually search before posting and give the answer you uncovered.Dave Patterson
d.pattersona at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

> Why don't you do a service to the other people who

> may actually search before posting and give the

> answer you uncovered.

You don't have to tell me this. I did search, but nothing could be found anywhere. There is little info about CDATA handling, and it appears that not all XML parsers do it the same way..

deepspacea at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Perhaps the word "actually" was over the top.So, how did you solve the problem? (In case someone else has a similar problem and finds this entry.)Dave Patterson
d.pattersona at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
I'm having a similar problem, and I found this post......
Seth.Aa at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
So? Can you please post your resolution so others can learn? Thanks.
GKrasnowa at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7
Of course for somebody who understood that a CDATA section is just a fancy text node, and not a black magic secret, there would be hundreds of examples available.
DrClapa at 2007-7-16 23:53:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...