ノードのすべての直接および非リーフの子のみを取得する xpath 式が必要です。
このような XML ツリーの式を実行すると、次のようになります。
<root>
<attribute1>a</attribute1>
<attribute2>b</attribute2>
<attribute3>c</attribute3>
<ElementA>
<ElementB>
<ElementC>AC</ElementC>
</ElementB>
</ElementA>
<ElementX>
<ElementB1>
<ElementC1>C1</ElementC1>
</ElementB1>
</ElementX>
<Other>
<ElementB2>B2</ElementB2>
</Other>
<NewOne>
<ElementB3>
<ElementC3>
<ElementC4>C4</ElementC4>
</ElementC3>
</ElementB3>
</NewOne>
</root>
ElementA、ElementX、Other、NewOne を取得する必要があります。
助けてくれてありがとう。