我有一个正在解析的 xml,其中有一个包含很长文本的字段,但不知何故它被解析器删除了,是不是因为我只使用字符串来获取那些字符,如果我使用字符串缓冲区或构建器。我想要的是仅按标签提取值。
@Override
public void characters(char[] ch, int start, int length)
throws SAXException {
if (elementOn) {
// its not reading element value, though tag is read.
elementValue = new String(ch, start, length);
elementOn = false;
}
}
这是文本:
<description>
<![CDATA[
Former CPI MLA Manish Kunjam, who returned on Thursday after, theis is a long long text very long that its being dropped.......so what can be done...................................................................................................
]]>
</description>
谢谢请指导我.....