Skip to content

Instantly share code, notes, and snippets.

@wcandillon
Last active August 29, 2015 14:24
Show Gist options
  • Save wcandillon/cbd86b0606da20088de2 to your computer and use it in GitHub Desktop.
Save wcandillon/cbd86b0606da20088de2 to your computer and use it in GitHub Desktop.
XML processing from S3
import module namespace s3 = "http://www.28msec.com/modules/s3";
import module namespace p = "http://zorba.io/modules/xml";
import schema namespace opt = "http://zorba.io/modules/xml-options";
(: In this example the XML files contains DTD declarations :)
let $parse-options := <opt:options>
<opt:DTD-validate/>
</opt:options>
let $manifest := s3:read-text({
"key": $id || "/manifest.xml",
"bucket": "asups"
})
let $manifest := p:parse(string($manifest), $parse-options)
return $manifest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment