0
我有一个html文件,它被读为一个字符串..我想解析并获取值使用<TD colSpan=2>Value :
因此,我应该从html文件获得大约10个值。我怎么能做到这一点..我想使用类似解析HTML为字符串以获取使用关键字的值
的startIndex endIndex的getsubstring
sMainBeginKeyword = "<td>Value : ";
sBeginKeyword = "<td>Value : ";
sEndKeyword = "</td>";
main_begin_index = result.indexOf(sMainBeginKeyword);
while (main_begin_index != -1) {
begin_index = main_begin_index;
end_index = result.indexOf(sEndKeyword, begin_index);
String deloc= result.substring(begin_index + sBeginKeyword.length(), end_index);
但是,这看起来很复杂,我无法获取更多的价值。由于我有很多值与不同的关键字..