Looking at the "id" field for a twitter database:
thufir@dur:~/flwor$
thufir@dur:~/flwor$ basex
BaseX 9.0.1 [Standalone]
Try 'help' to get more information.
>
> open twitter
Database 'twitter' was opened in 218.67 ms.
>
> xquery //id
<id type="number">1224165280068382720</id>
<id type="number">60919433</id>
<id type="number">1224160851797643264</id>
<id type="number">60919433</id>
..
<id type="number">14248074</id>
Query executed in 268.13 ms.
>
how would I get the same result from a FLWOR
statement?
thufir@dur:~/flwor$
thufir@dur:~/flwor$ cat id.xq
for $tweets in db:open("twitter")
let $tweet := $tweets
return <results>{$tweet}</results>
thufir@dur:~/flwor$
which wraps everything in <result>
tags, but still gives every node. How is just the "id" node selected? Trying variations on:
let $tweet := $tweets/id
without positive results. Perhaps because there's JSON
in the mix?