gpt4 book ai didi

xpath - Xpath-如何测试多个属性?

转载 作者:行者123 更新时间:2023-12-03 16:18:27 26 4
gpt4 key购买 nike

<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter and the Deathly Hallows</title>
<author>J.K. Rowling</author>
<year>2007</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">XQuery Kick Start</title>
<author>James McGovern</author>
<author>Per Bothner</author>
<author>Kurt Cagle</author>
<author>James Linn</author>
<author>Vaidyanathan Nagarajan</author>
<year>2003</year>
<price>49.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter and the Chamber of Secrets</title>
<author>J K. Rowling</author>
<year>1998</year>
<price>29.99</price>
</book>




我需要选择作者不止一本书的书名。我不确定如何做到这一点。我知道有几种方法可以针对此特定示例执行此操作,但我需要以实际检查多位作者的方式进行操作。

最佳答案

/bookstore/book[count(author) > 1]/title

关于xpath - Xpath-如何测试多个属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23328346/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com