この単純な XML ファイルを Java プロジェクトにバインドしたい:
<?xml version="1.0" encoding="UTF-8"?>
<itg>
<reader>
<chapter id="1">
<subchapter id="1"></subchapter>
<subchapter id="2"></subchapter>
</chapter>
<chapter id="2">
<subchapter id="1"></subchapter>
<subchapter id="2"></subchapter>
</chapter>
<chapter id="3"></chapter>
</reader>
<questions>
</questions>
</itg>
私は NetBeans を使用していますが、実際には、XML ファイルを解析して ArrayList にバインドし、リストをバインドします。動作しますが、より良い方法で xml ファイルをバインドすることは可能ですか?
ありがとう!