XApplication Java API doesn't work with CDATA

X-Application Version: 3.1.2
Tamino Version : 3.1.1
Platform : NT
WebContainer : Tomcat 3.3.1
JDK Version : 1.3.1_01

Hello,
When I try to modify a XML with a CDATA element the XApplication Java API fails with the error:

“content not supported: class org.jdom.CDATA”.

Example:

This xml is Tamino:
------------------

Test of CDATA

< ![CDATA[

This is a Test

]]>



This code try to modify the xml document:
----------------------------------------
docCursor = ws.query(“testList”, “test”);
if (docCursor.hasNext()) {
doc = (BusinessDocument)docCursor.next();

doc.modify(); // <–the program fails here!

doc.getDescendant(“/test/name”).setValue(“N”);
doc.getDescendant(“/test/x”).setValue(“< ![CDATA[

subt

]]>”);

doc.commit();
doc.close();
}

Thanks and regards,
Guillermo Avendaño

[This message was edited by Christian Freytag on 21 Mar 2003 at 07:46.]

Yes, CDATA embedded in X-Application tags is not supported. Do you actually need the CDATA section? As a work-aroung, you could replace special characters by character references like
“'”

Michael

Software AG Germany, Darmstadt

Hello Michael,
As a work-around i used “Reserved Characters”, for example “<” instead “<” and so on and XApplication Java API don’t fail.

Thanks
Guillermo
X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

Hello,

with the new XPath evaluation embedded in X-Application 4.1.1 it is possible to display / edit CDATA section of your documents.

Interesting Simple Examples within this context are:
- Mixed Content
- Raw Content

Bye,
Christian.