Hi All, i think that i found a bug in UTF8StreamWriter.writeTextContent(String text). In this method the entity &, < are replaced by their escape sequence. Moreover if:
else if (chr == '>' && i > 2 && text.charAt(i-1) == ']' && text.charAt(i-2) == ']') { m_buffer[fill++] = (byte)']'; m_buffer[fill++] = (byte)']'; fill = writeEntity(GT_ENTITY, fill); } the > is replaced with >. The code above means: if the current char is > and the previous chars are ]] ....escape the >. Well, i have a java class that contains a text with: this is my <![CDATA[text]]> with some problem My expected xml is: <Data>this is my <![CDATA[text]]> with some problem</Data> but the result is: <Data>this is my <![CDATA[text]]]]> with some problem</Data> So the ]] are now ]]]]. I think this is caused because my text doesn't start with CDATA so it is handled as simple text. I fixed it removing: m_buffer[fill++] = (byte)']'; m_buffer[fill++] = (byte)']'; What do you thing about that ? Thanks a lot Stefano ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users