Hi Pragya, You could iterate over your mapping and xdmp:unpath each mapping for a given doc. If you need to do that for just one doc at a time, that would work relatively fast. It would be different if you would need to pull up many documents mapped like that..
Cheers, Geert From: <[email protected]<mailto:[email protected]>> on behalf of "Kapoor, Pragya" <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Thursday, December 8, 2016 at 8:27 AM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Extracting dynamic data points from XML Hi, I have an requirement where in I need to fetch 90 different data points(dynamic) from XMLs(stored in Marklogic,) based on the xpaths and convert it in json file.One json file(with all 90 data points) for one xml. I have a mapping for datapoint to xpaths. Sample mapping xml: <datapoints> <datapoint> <name>xyz</name> <path>a/b/c/d/e/f/g/h/j/k/l/m/n</path> </datapoint> <datapoint> <name>abc</name> <path>a/b/c/d/e/f/g/h/j/k[@d='q']/l/z/n</path> </datapoint> <datapoint> <name>phd</name> <path>a/b/z/d/e/f/g/h/j/k/l/m/n</path> </datapoint> </datapoints The file size of data XML is around 10-16MB. Creating index on x-paths is not feasible option as it would be dynamic .Moreover, many element names are same. So, what is the best way to achieve this? Thanks Pragya "This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
