0

我正在使用 Java 摘要器来读取 XML。我的 XML 元素有一些 HTML 内容,例如:

<title> Understand the following as special cases:<br/>a. Bundle of ten ones — called a "ten."<br/>b. The numbers from 11 to 19 are composed of a ten and one, two, three, four, five, six, seven, eight, or nine ones.<br/>c. Recording the results of comparisons with the symbols >, =, and <.</title>

解析后更改如下。

Understand the following as special cases: &lt;br/>a. Bundle of ten ones — called a "ten." &lt;br/>b. The numbers from 11 to 19 are composed of a ten and one, two, three, four, five, six, seven, eight, or nine ones.&lt;br/>c. Recording the results of comparisons with the symbols &gt;, =, and &lt;.

我想按原样阅读或解析。

4

1 回答 1

1

这不是正确形成的 XML。例如:

使用符号 >、= 和 < 记录比较结果

应该使用 XML 实体&lt;&gt;

因此,XML 解析器会因此而失败。

于 2012-08-01T13:07:11.883 回答