XPath to return string concatenation of qualifying child node values

前端 未结 7 1629
太阳男子
太阳男子 2020-11-29 07:44

Can anyone please suggest an XPath expression format that returns a string value containing the concatenated values of certain qualifying child nodes of an element, but igno

相关标签:
7条回答
  • 2020-11-29 08:15

    This look that works:

    Using as context /div/:

    text() | em/text()
    

    Or without the use of context:

    /div/text() | /div/em/text()
    

    If you want to concat the first two strings, use this:

    concat(/div/text(), /div/em/text())
    
    0 讨论(0)
提交回复
热议问题