且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从Dom4j Node.selectObject或Node.selectNodes获取字符串列表

更新时间:2023-11-15 18:06:58

来自 http://www.w3.org/TR/xpath/#section-简介

计算表达式以产生一个 对象,具有以下之一 四种基本类型:

An expression is evaluated to yield an object, which has one of the following four basic types:

  • 节点集(无重复的无序节点集合)
  • 布尔值(对或错)
  • 数字(浮点数)
  • 字符串(UCS字符序列)
  • node-set (an unordered collection of nodes without duplicates)
  • boolean (true or false)
  • number (a floating-point number)
  • string (a sequence of UCS characters)

因此,XPath 1.0中没有xs:string的序列

So, no sequence of xs:string in XPath 1.0

在XPath 2.0中,当然有一个序列数据类型...

In XPath 2.0 there is a sequence data type, of course...