我正在尝试创建一个图片库:
<card>
<product catalog="Thread Works">
<name>AK E001</name>
<price>45</price>
<path>assets\cards\AK_E001.jpg</path>
</product>
<product catalog="Paper Work">
<name>AK E001</name>
<price>45</price>
<path>assets\cards\AK_PP003.jpg</path>
</product>
<product catalog="Thread Works">
<name>AK E002</name>
<price>50</price>
<path>assets\cards\AK_E002.jpg</path>
</product>
我可以访问该属性,但如果我选择“Thread Works”,我只想访问
<product catalog="Thread Works">
子节点,以便将项目添加到数组集合中任何帮助谢谢