Changes

Jump to navigation Jump to search
451 bytes added ,  18:49, 11 May 2020
==Database Nodes==
Database nodes are In BaseX, a “database nodes” is usually an XML nodes which are either node that is stored in a persistent database. However, or which are it can also be a node of a main-memory database representation, or the result of a main-memory update operation. Some operations are restricted to database nodes, but you can convert XML fragments can be converted to a main-memory database nodes by e. g. applying the [[XQuery_Update#update|update]] or [[XQuery_Update#transform|transform]] expression on to a node. Two examples: * Retrieve the internal node id of an XML fragment: <syntaxhighlight lang="xquery">let $xml := <xml>hello world</xml> update {}return db:node-id($xml/text())</syntaxhighlight> * Puts a marker element around the result of a full-text request (see {{Function|Full-Text|ft:mark}} for more details):
<syntaxhighlight lang="xquery">
dbcopy $p :node-id= <xml>hello world</xml>modify (element hello { )return ft:mark($p[text() contains text 'word'], 'worldb' } update {})
</syntaxhighlight>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu