开发者

Im using a SAXParser and the Apostrof ( ' ) in <title> or <description> makeing problem

开发者 https://www.devze.com 2023-02-03 14:22 出处:网络
I am using SAXParser and the characters after any Apostrof(\') in the xml file will not be printed i the listview? Anybody know why?

I am using SAXParser and the characters after any Apostrof(') in the xml file will not be printed i the listview? Anybody know why?

Example:

<title>I'am a good Android programmer</tit开发者_如何学Cle>

The characters after "I'" will not bee printed...


The parser may be overly sensetive to characters that may need escaping in certain situations. From what I can gather, apostrophes should not need escaping when it's part of the content, only when it's part of an attribute value. I tried it in an online XML validator, and it did agree with that.

Try to escape the apostrophes anyway:

<title>I&apos;am a good Android programmer</title>
0

精彩评论

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