解析している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>
ありがとうplzガイド私.....