为什么sax解析xml时会多出来奇怪的换行???
xml文件中有一段是:
<ISBN>0060938455</ISBN>
<CLASSIFY>english</CLASSIFY>
<WORDS></WORDS>
<PAGES>340</PAGES>
<FORMAT>Dimensions (in inches): 1.41 x 9.57 x 8.63 </FORMAT>
CIP元素的值是empty,经过characters后输出内容:
elemValue:0060938455
elemValue:english
elemValue:
elemValue:340
elemValue:Dimensions (in inches): 1.41 x 9.57 x 8.63
<WORDS>元素加了空行,如果
变成<WORDS> </WORDS> (加空格),结果是好的,
求解答!
thank you!