xquery - MarkLogic can't find my xml documents -


i new marklogic , studying xquery. problem documents can't found marklogic server.

when execute gives me your query returned empty sequence. can me?

enter image description here

enter image description here

there few things may going wrong here.

first, let's confirm have loaded content. in query console (which you're using), click explore button. if all's well, should see list of document uris in results section. copy , paste 1 of uris fn:doc-available() command, , should true.

if explore didn't show anything, perhaps accidentally loaded content different database. try changing content source "documents", click explore. there? if not, can check other databases have.

if you're still not seeing data, connected query console "admin" user? if not, it's possible user connected doesn't have permission see documents.

if it's not of above, document load didn't work. how did load content database?


edit: comment below leads me think no data has been loaded database.

to load single file explore with, can use xdmp:document-load():

xdmp:document-load("c:\myfile.xml",   <options xmlns="xdmp:document-load">     <uri>/documents/myfile.xml</uri>     <repair>none</repair>     <permissions>{xdmp:default-permissions()}</permissions>   </options>) 

to load bunch of documents, take @ marklogic content pump.

before going further, encourage take marklogic university's fundamentals course. it's free , available either live instructor or in self-paced format. there tutorials available @ developer.marklogic.com, including developing xquery applications. if you'd skip setup, check out interactive xquery playground.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -