开发者

XML parsing problem on Blackberry

开发者 https://www.devze.com 2022-12-16 01:26 出处:网络
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

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();

0

精彩评论

暂无评论...
验证码 换一张
取 消