我将twitter的JSON搜索输出加载到Marklogic中,使用基本变换器将其转换为Marklogic的JSON XML格式。Marklogic Json Xquery无法查询
当我尝试使用下面的XQuery
xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";
for $r in doc()/json
let $b:=$r/id
return (
$b)
它不断抱怨没有结果查询的ID。
当我使用doc()时,xml显示正常,但doc()/ json不显示任何内容。
下面是从JSON输出产生Marklogic从Twitter
<?xml version="1.0" encoding="UTF-8"?>
<json type="object" xmlns="http://marklogic.com/xdmp/json/basic">
<contributors type="null"/>
<truncated type="boolean">false</truncated>
<text type="string">@angelicism I love this site: http://t.co/XIjckcu0Lk</text>
<in__reply__to__status__id type="number">369589929183297536</in__reply__to__status__id>
<id type="number">369595664277065728</id>
<favorite__count type="number">0</favorite__count>
...