Line breaks in XML are ignored by the SAX Parser
- by Siddharth Iyer
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!!!