XML : How to get XML values in a array from marklogic?

I was using the following XMl and XSD sample: https://msdn.microsoft.com/en-us/library/ms764613(v=vs.85).aspx

I am trying load the schema adnd ata in Marklogic and retrive values from it.

With my current code, I was able to get the results in json format.

  xquery version "1.0-ml";  import module namespace json="http://marklogic.com/xdmp/json"   at "/MarkLogic/json/json.xqy";    let $config := json:config("full") ,      $cx := map:put( $config, "whitespace"     , "ignore" )  return      json:transform-to-json( fn:doc("books.xml") , $config )    

Can someone help me rewrite the code to get the values in a array. Like you retrieve it from a SQL DB. With columns and rows?

No comments:

Post a Comment