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");
}

