Created
June 8, 2020 05:19
-
-
Save EmmanuelOga/eb29bc02d82d849de8cebc39beaabe00 to your computer and use it in GitHub Desktop.
Read text and/or parse XML from BaseX binary store
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| declare namespace sd = 'http://eoga.dev/sdoc'; | |
| declare function sd:read-string($path as xs:string) as xs:string { | |
| convert:binary-to-string(db:retrieve("rainbowfish", $path), 'UTF-8') | |
| }; | |
| declare function sd:read-xml($path as xs:string) as item() { | |
| fn:parse-xml(sd:read-string($path)) | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment