Hi Ben,
But the result from: return db:add($MariaBase, $doc, $db) is: BaseX database "Relational"
<Innovate> <Innovate> <Dienst>
That’s strange indeed. I tried to reproduce this by…
1. running db:create('Relational'), 2. running the attached script and 3. running db:open('Relational'),
but the last query gives me the expected XML structure (without nested Innovate elements). Could you provide me with a self-contained example?
What would be the advantage of representing single tables as a document? Aren't both approaches equivalent?
They are both feasible. It always depends on your use case which one is more suitable.
Best, Christian
let $MariaBase := 'Relational' let $db := 'innovate.xml' (: arbitrary :) let $doc := <Innovate> <Dienst> <row> <Dienst_ID>1</Dienst_ID> <Dienst>CIO Office</Dienst> </row> <row> <Dienst_ID>2</Dienst_ID> <Dienst>Dictu</Dienst> </row> </Dienst> </Innovate> return db:add($MariaBase, $doc, $db)