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.
下面添加的这个 xpath 行有什么问题:
/holiday[starts-with(@code,'A')/holidaytype[1]/duration[@period=(15)]
我正在尝试按假期代码过滤,然后按天数(期间)过滤。
您缺少 a/和 a ]。看:
/
]
/holiday[starts-with(@code,'A')/holidaytype[1]/duration[@period=(15)] ^ ^ ^-- missing here ^-- and "]" here
在第一种情况下,它可以是 a//或//*/。所以,试试:
//
//*/
//holiday[starts-with(@code,'A')]/holidaytype[1]/duration[@period=(15)]