I am using SAX Parser to parser XML file on Blackberry p开发者_运维问答latform.
Some XML tags contains exrta spaces and newline characters. How to remove this unnecessary whitespace characters while parsing XML file.
Any help would be appreciated.(I tried to use Trim() function but still it doesn't remove extra whitespaces.)
Thanks,
Jim.Try str.replace("\n","").replace("\r","").trim();
精彩评论