我正在解析资产文件夹中的 XML 文件以将我的数据转储到数据库中。稍后我可能会获取它并将其显示在文本视图中。但是在解析时我丢失了一些数据,即如果我在解析之前在 XML 标记中有大约 50 个单词,在我的数据库中我无法在解析后找到所有这些。
例如:我正在解析这一行:
<about>Skandagiri also known as kalavara durga, is an ancient mountain fortess located approximately 70km from Banglore city and 3 km from Chikkaballapur in the Indian State of Karnataka.It is off Bellary road(NH 7, Hyderabad to Bangalore Highway) and overlooks Nandi Hills, Mudddenahalli and Kanive narayanapura.The peak is at an altitude of about 1350 meters</about>
在我的数据库中解析后:
at an altitude of about 1350
我正在使用 String 来保存我的解析值,如下所示:
if (element.equalsIgnoreCase("about")){
String str=parsedValue;
}