0

XMLの読み取りにJavaダイジェスターを使用しています。私の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 に答える