XQuery多值字段(IDREFS)

时间:2016-10-05 19:12:36

标签: xml xquery

在我的XML文件中,我有这个元素

 <subtopics>tr1 tr2</subtopics>

我使用以下查询在XQuery中检索

doc("data.xml")/expert_schema/topic/data(subtopics)

如何单独检索tr1tr2

1 个答案:

答案 0 :(得分:0)

如果性能不是问题,那么您可以在查询时简单地标记值:

doc("data.xml")/expert_schema/topic/tokenize(subtopics, '\s')