私は XPath や Java に行き詰まっています。次のような XML ドキュメント構造があります。
<document>
<text>
<headline>This is the text's headline</headline>
This is the text.
</text>
</document>
私が必要とするのはこれです:
<document>
<text>
<headline>This is the text's headline</headline>
<w>This</w>
<w>is</w>
<w>the</w>
<w>text</w>
<w>.</w>
</text>
</document>
見出しノードをそのままにして、テキストノードのテキストコンテンツを変更するにはどうすればよいですか?! (org.jdom2.xpath を使用しています。)
ボブ