解析XML时preserve换行符 [英] Preserve newlines when parsing xml
本文介绍了解析XML时preserve换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是SAX XML解析器解析其中包含换行符一些XML数据。当使用属性#的getValue,换行数据都将丢失。如何保持新行?
I'm using the SAX xml parser to parse some xml data which contains newlines. When using Attributes#getValue, the newline data is lost. How can keep the newlines?
推荐答案
该解决方案是使用&放大器; #xA;对
代替\ñ
The solution was to use 

instead of \n
这篇关于解析XML时preserve换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文