Apache commons 構成を使用して xml を読み込もうとしています
これは私のサンプルxmlファイルです
<tu tuid="chan@">
<note>Label for iCare OLTP administration.</note>
<prop type="maxlength">75</prop><prop type="minlength">1</prop>
<tuv lang="ES-ES">
<seg>Programa, tarjetas, cupones y reglas</seg>
</tuv>
</tu>
これは私のJavaコードです:
List<ConfigurationNode> tuvNode = element.getChildren("tuv");
List<ConfigurationNode> segNode = tuvNode.get(0).getChildren("seg");
System.out.println(segNode.get(0).getValue());
出力は次のとおりです。
Programa
実際には機能しています。問題は、「、」が含まれている場合、残りの他の値が得られないことです。値全体が必要です。誰でもアイデアを与えることができます。私の予想出力は次のとおりです。
Programa, tarjetas, cupones y reglas
本当に感謝しております
ありがとう