gpt4 book ai didi

xml - XPath contains() 条件含义?

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

我试图解释以下条件的含义:

<xsl:when test="contains($name,'|') or contains($name,'%7c') or contains($name,'%7C')"> 

以上是否检查变量 name|在其中 OR 有 7 个小写字符或 7 个大写字符?

最佳答案

不,它检查是否 $name包含任何指定的文字子字符串:|%7c%7C .

XML XPath Language (XPath), Version 1.0, W3C Recommendation :

Function: boolean contains(string, string)

The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.



另见:
  • What does contains() do in XPath?
  • How to use XPath contains() for specific text?
  • 关于xml - XPath contains() 条件含义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59163175/

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