0

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?

Joe Wicentowski
  • 5,159
  • 16
  • 26
user1598696
  • 550
  • 1
  • 4
  • 22

2 Answers2

3

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.

dirkk
  • 6,160
  • 5
  • 33
  • 51
1

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

user1598696
  • 550
  • 1
  • 4
  • 22