gpt4 book ai didi

xml - 如何为我的xpath输出提供输入

转载 作者:行者123 更新时间:2023-12-03 17:25:35 24 4
gpt4 key购买 nike

我需要在xpath的输出列表中插入逗号。
这是我的xpath:

//OrderLine/Product/*/ProductName


这是输出:

Node ProductName : Email Service
Node ProductName : Email
Node ProductName : Internet Access Service
Node ProductName : IC31
Node ProductName : IC01
Node ProductName : Sport1 pakket


所需输出:

Email Service, Email, Internet Access Service, IC31, IC01, Sport1 pakket

最佳答案

尝试使用string-join()函数,如下所示:

string-join(//OrderLine/Product/*/ProductName, ",")


附言可从XPath 2.0获得

关于xml - 如何为我的xpath输出提供输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46343518/

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