<url>{substring-before(data($y/link[1]/@href),'&')}</url>
我尝试运行时遇到的错误是
No closing ';' found for entity or character reference
有人知道导致此错误的原因吗?
最佳答案
在 XQuery 中,字符串文字(以及在某些其他上下文中)中的 & 符号需要作为 &
进行转义,就像在 XML 中一样。
关于xpath - 带有 fn :substring-before 的 Xquery 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7976187/