String XQuery标记是否始终返回完整路径的字符串?
我需要帮助。 我的周期如下:String XQuery标记是否始终返回完整路径的字符串?,string,tags,xquery,concat,String,Tags,Xquery,Concat,我需要帮助。 我的周期如下: <deviceInformationList> { for $entityCounter in 2 to fn:count($getDeviceResponse/return/timList/packetSessionInfoList) return let $nameSeq := ('', 'sessionActive', 'sess
<deviceInformationList>
{
for $entityCounter in 2 to fn:count($getDeviceResponse/return/timList/packetSessionInfoList)
return
let $nameSeq := ('',
'sessionActive',
'sessionLastIpAddress')
let $typeSeq := ('',
'String',
'String')
let $valueSeq := ('',
'packetSessionActive',
'ipv4Address')
return
<deviceInformationItem>
<itemName>{ fn:concat($nameSeq[$entityCounter], $entityCounter) }</itemName>
<itemType>{ $typeSeq[$entityCounter] }</itemType>
<itemValue>{ data( fn:concat('$return/timList[1]/apnList[1]/', $valueSeq[$entityCounter]) ) }</itemValue>
</deviceInformationItem>
}
</deviceInformationList>
{
对于2到fn中的$entityCounter:count($getDeviceResponse/return/timList/PacketSessionInfo列表)
返回
让$nameSeq:=(“”,
“会话活动”,
‘sessionLastIpAddress’)
让$typeSeq:=(“”,
'字符串',
'字符串')
让$valueSeq:=(“”,
“packetSessionActive”,
“IPV4地址”)
返回
{fn:concat($nameSeq[$entityCounter],$entityCounter)}
{$typeSeq[$entityCounter]}
{数据(fn:concat('$return/timList[1]/apnList[1]/',$valueSeq[$entityCounter]))
}
我需要将标记itemValue的内容设置为要解释的完整路径,并从该字段返回值。我还没有找到一种方法,我使用的每个函数都被解释为一个字符串。
任何帮助都将不胜感激 不是你问题的答案,但可能会有帮助。我认为顶部的
应该是
,以表示开始标签;您必须关闭标记data()
函数不会像这样计算传递给它的参数(请参阅)。根据您使用的处理器,可能有一个eval扩展函数。否则,您将不得不以不同的方式处理问题。请查看并提供示例输入,以及当前和预期的输出。谢谢Chris。但那是打字错误,更正了。丹尼尔,我正在使用Oracle OSB,有没有关于如何使用的线索?或者其他解决方案而不是这个?