Hi BaseX gurus, I noticed that if the resource is persisted in basex, there is a way to tell what type of the resource it is(db:content-type?). However, I’m wondering for new resources to be persisted, is there a way to determine ? Or mostly needs to rely on the application to determine which basex call to be make ? I’m seeing on the document that db:store is to persist binary database and use db:add for other documents. Does it mean that the caller really need to know the type of the resource, in order to determine which db function to call ? Thanks much for your help. Regards, -Genneva
Does it mean that the caller really need to know the type of the resource, in order to determine which db function to call ?
Yes – unless you use WebDAV (which will automatically find out if your input is well-formed XML) or the REST API (which will evaluate the specified content type) [1]. Please note that BaseX is primarily an XML database. This is the reason why extra functions for binary contents have been added. Christian [1] http://docs.basex.org/wiki/Web_Application
participants (2)
-
Christian Grün -
Wang, Genneva