Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个这种格式的 xml:
我们怎么做才能得到以下条件:如果制造日期是星期三,请选择 Batch value="xpkk",如果制造日期是星期一,请选择 Batch value=abcd?
我不知道“制造日期是星期三”应该是什么意思。但你可以尝试:
//material[book/manufacture/@date = 'wednesday']/Batch
如果您要寻找的制造商在变量中,可以说day您可以尝试:
day
//material[book/manufacture/@date = $day]/Batch