0
votes

I'm noob with this stuff, so can someone please give me some example how to store an xml file (rss feed) into eXist database with XQuery? i would be really grateful. thanks!

P.S. is it possible to use YQL for this kind of work?

2

2 Answers

3
votes

Take a look at the documentation on how to manipulate database content. You need the xmldb module.

I don't think there is any YQL-module for XQuery or eXist specific. I also don't think it would be any useful, as you have XQuery for this kind of stuff in XML databases. YQL in contrast is more like a SQL replacement and comes with all the pain of SQL-to-XML mapping. XQuery is much more suitable for XML data.

1
votes

I've found it... Here are functions for storing:

xmldb:store($collection-uri as xs:string, $resource-name as xs:string, $contents as item())

or

xmldb:store($collection-uri as xs:string, $resource-name as xs:string, $contents as item(), $mime-type as xs:string)

but here you can find more specific functions for your need.

The bad thing is there are no examples of usage...that could be hard for beginners like me