考虑以下带有重复跟随兄弟的 xpath:
//tr[td[text()='Map']]/td/following-sibling::td/following-sibling::td/preceding-sibling::td/text()", doc, XPathConstants.NODESET)
它与单个跟随兄弟的结果相同:
//tr[td[text()='Map']]/td/following-sibling::td/following-sibling::td/preceding-sibling::td/text()", doc, XPathConstants.NODESET)
显然重复的后续兄弟姐妹被视为重复..?那么如何达到“给我第三个兄弟姐妹”的效果呢?
谢谢!