私はXPathの初心者なので、これを理解するのに助けが必要です。次のような XML ファイルがあります。
<items>
    <item>
        <brandName>Brand 1</brandName>
        <productTypes>
            <productType>Type 1</productType>
            <productType>Type 3</productType>
        </productTypes>
    </item>
    <item>
        <brandName>Brand 1</brandName>
        <productTypes>
            <productType>Type 2</productType>
            <productType>Type 3</productType>
        </productTypes>
    </item>
    <item>
        <brandName>Brand 2</brandName>
        <productTypes>
            <productType>Type 4</productType>
            <productType>Type 5</productType>
        </productTypes>
    </item>
</items>
特定のブランドの一意の productType をすべて取得する方法を見つけようとしています。たとえば、「ブランド 1」のすべての一意の productType は、「タイプ 1」、「タイプ 2」、「タイプ 3」を出力します。
私はあまり運がなくてもグーグルしています。どんな助けでも大歓迎です!