Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Newline inserted into CDATA section by parser

843834Apr 22 2005 — edited Apr 26 2005
I'm parsing an xml file with a CDATA value that contains xml content. After parsing the file, I display the CDATA value within a JTextArea. For some reason, this xml content ends up double-spaced (hex data 0D 0A 0D 0A, instead of just the original 0D 0A at the end of each line). A newlines are being inserted into my CDATA data. I thought the parser wasn't supposed to change this data.

I'm extending the SAX DefaultHandler and don't implement the LexicalHandler. Am I supposed to implement the LexicalHandler interface when using CDATA?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2005
Added on Apr 22 2005
6 comments
345 views