Line breaks in XML are ignored by the SAX Parser

Posted by Siddharth Iyer on Stack Overflow See other posts from Stack Overflow or by Siddharth Iyer
Published on 2011-02-01T07:14:10Z Indexed on 2011/02/01 7:25 UTC
Read the original article Hit count: 169

Filed under:
|
|
|
|

I am parsing an XML with some CData that contains line breaks. The parser ignores these line breaks.

I am trying to figure out a way to catch these newlines in the characters() method and replace them with a break tag for display purposes.

I have tried almost everything under the sun and have been scouring stackoverflow for the past 3 hours.

I tried every combination of replacing "\n", "\r\n" and so on with a break tag in the characters() method of the parser.

I am absolutely helpless right about now.... and would sincerely appreciate any help I can get.

Thanks!!!

© Stack Overflow or respective owner

Related posts about android

Related posts about newline