Hi, 

  I am using Xalan-1.6.  I have a question about CDATA handling in one
of your example, "SerializeNodeSet".

  In the example, you have a foo.xml.

  I modify the original foo.xml to the following (simply adding a CDATA
section):

<?xml version="1.0"?>
<doc>

<![CDATA[
this is the cdata test section
]]>

  <name first="David" last="Marston">Mr. Marston</name>
  <name first="David" last="Bertoni">Mr. Bertoni</name>
  <name first="Donald" last="Leslie">Mr. Leslie</name>
  <name first="Emily" last="Farmer">Ms. Farmer</name>
  <name first="Myriam" last="Midy">Ms. Midy</name>
  <name first="Paul" last="Dick">Mr. Dick</name>
  <name first="Scott" last="Boag">Mr. Boag</name>
  <name first="Shane" last="Curcuru">Mr. Curcuru</name>
  <name first="Joseph" last="Kesselman">Mr. Kesselman</name>
  <name first="Stephen" last="Auriemma">Mr. Auriemma</name>
</doc>

When I run the program by typing "SerializeNodeSet ./foo.xml / doc", I
got the following result:

<doc>

this is the cdata test section

  <name last="Marston" first="David">Mr. Marston</name>
  <name last="Bertoni" first="David">Mr. Bertoni</name>
  <name last="Leslie" first="Donald">Mr. Leslie</name>
  <name last="Farmer" first="Emily">Ms. Farmer</name>
  <name last="Midy" first="Myriam">Ms. Midy</name>
  <name last="Dick" first="Paul">Mr. Dick</name>
  <name last="Boag" first="Scott">Mr. Boag</name>
  <name last="Curcuru" first="Shane">Mr. Curcuru</name>
  <name last="Kesselman" first="Joseph">Mr. Kesselman</name>
  <name last="Auriemma" first="Stephen">Mr. Auriemma</name>
</doc>




The "<![CDATA[" and "]]>" symbol simply disappeared in the output.  What
I want is that these CDATA symbols still exists after running the
program. 

 
I have tried the function "theFormatter.setEscapeCData (true) or
theFormatter.setEscapeCData (false)", it does not help at all.

Could you let me know how can I solve this problem?



Thanks

Richard Liu
Software Engineer at Boeing





Reply via email to