次のようないくつかのノードにいくつかのhtmlコンテンツを含むxmlがあります
<detail>
<P>Students should avoid purchasing their textbooks at the first store that they browse. Instead, they should investigate the alternatives offered by other online booksellers. Price isn't the only factor to consider when making an online purchase. Students should also factor in shipping costs and delivery time when making their buying decision.</P>
</detail>
jsonまたはjson-libによるxmlからJsonへの変換中、
import net.sf.json.JSON;
import net.sf.json.xml.XMLSerializer;
.....
JSONObject jsonObject = XML.toJSONObject(xml.toString());
......
xml は xml コンテンツを含む文字列です
json文字列を次のように取得する必要があります
{"detail":"<P>Students should avoid purchasing their textbooks at the first store that they browse. Instead, they should investigate the alternatives offered by other online booksellers. Price isn't the only factor to consider when making an online purchase. Students should also factor in shipping costs and delivery time when making their buying decision.</P>"}
しかし、出力は次のようなものです
{"detail":{"P":"Students should avoid purchasing their textbooks at the first store that they browse. Instead, they should investigate the alternatives offered by other online booksellers. Price isn't the only factor to consider when making an online purchase. Students should also factor in shipping costs and delivery time when making their buying decision."}}
これは適切ではありません。
この問題を解決するにはどうすればよいですか?