import org.jsoup.Jsoup;
import org.jsoup.nodes.*;
import org.jsoup.select.*;
public class My_Test {
public static void main(String[] args) throws Exception {
String xml = "<span id=sectionLinesDetail>\n" +
" <tr id=123>\n" +
" <td>text</td>\n" +
" </tr>\n" +
"</span>";
Document doc = Jsoup.parse(xml);
Elements e_span = doc.select("span[id=sectionLinesDetail]");
System.out.println(e_span);
}
}
我想要这样的结果:
<span id=sectionLinesDetail> <tr id=123> <td>文本</td> </tr> </span>
但我得到的是这样的
<span id=sectionLinesDetail> 文本</span>
反正有没有跳过验证?
谢谢。