Hi, I am using json:transform-to-json() function to convert XML node to json however for a nested xml node and with custom configuration, this function is suppressing some content.
Could you please suggest where I am doing mistake or this is not the right conversion (json is not fit for mixed content )? import module namespace json = "http://marklogic.com/xdmp/json" at "/MarkLogic/json/json.xqy"; let $node := <p>This is my test data <i>this should be italic</i> sample content</p> let $custom := let $config := json:config("custom") let $_ := map:put( $config, "whitespace", "ignore" ) return $config return json:transform-to-json( $node, $custom ) Result- { "p": { "i": "this should be italic", "_value": " sample content" } } import module namespace json = "http://marklogic.com/xdmp/json" at "/MarkLogic/json/json.xqy"; let $node := <p>This is my test data <i>this should be italic</i> sample content</p> return json:transform-to-json( $node, json:config("full") ) Result- { "p": { "_children": [ "This is my test data ", { "i": { "_children": [ "this should be italic" ] } } , " sample content" ] } } Regards, Indrajeet
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
