Reputation: 580
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?
Upvotes: 0
Views: 727
Reputation: 580
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
Upvotes: 1
Reputation: 6218
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.
Upvotes: 3