我正在使用属性" ID"在我的搜索查询中。所以我打算为属性" ID"创建属性范围索引。对于以下示例XML。
<head>
<title>
<note ID=20 >1</note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</title>
</head>
我的问题是我需要将哪个标记(<Head> or <Title> or <Note>)
称为&#34;父母本地名称&#34;发挥最大作用。
答案 0 :(得分:0)
note
元素,因为ID
是此元素中的属性
答案 1 :(得分:0)
<head>
或<title>
代码不包含任何属性,该属性属于<note>
代码。
此外,您可以通过此
cts:search(//head,
cts:element-attribute-value-query(
xs:QName("note"),
xs:QName("ID"),
"20"))