現在、私は次のようなxml構造を持っています:
<element type="Input" name="nationality">
<property i18n="true" text="Nationality" prefix="person.nationality."
name="caption">caption</property>
<property i18n="true" text="Nationality" prefix="person.nationality."
name="desc">desc</property>
<property name="visible">1</property>
<property name="mandatory">0</property>
<property name="value">AUS</property>
<restriction prefix="country." base="String">
<enumeration text="Albania" value="ALB" />
<enumeration text="Algeria" value="DZA" />
<enumeration text="Argentina" value="ARG" />
<enumeration text="Australia" value="AUS" />
<enumeration text="Austria" value="AUT" />
<enumeration text="Bahrain" value="BHR" />
</restriction>
</element>
xpathを使用して、プロパティ[@ name='value']のテキストと等しい値を持つ列挙[@text]タグの値を抽出する方法はありますか。この場合、期待値テキスト「オーストラリア」。
xpathを使用するのは初めてですが、どんなアイデアでもありがたいです。皆さんありがとう。