21 Jun
2020
21 Jun
'20
12:54 p.m.
Hi Nick,
for $x in db:open("bccdc_covid19") return rename node $x//baz as "foo"
The rename expression must be performed on a single target node. Try this instead: for $baz in db:open("bccdc_covid19")//baz return rename node $baz as "foo" …or… db:open("bccdc_covid19")//baz ! (rename node . as "foo") Hope this helps, Christian On Fri, Jun 19, 2020 at 12:22 AM Nicholas <saunders.nicholas@gmail.com> wrote:
Pardon, this indeed works:
for $x in db:open("bccdc_covid19") return rename node $x//baz as "foo"
but only for the first node baz -- how can I rename all of the nodes? Or match an Xpath?
It's CSV data, so the general layout (?) is csv/record/entry and instead of "record" I'd want that to be something else -- doesn't really matter what.