I have an XML file that has many <Tx> nodes (around 6922), and under that it has sub-nodes so it make sense to use "Fragment root" method. Can you please guide which method should I use to fragment the XML file:
Use MLCP to fragment the XML
C:\Example> mlcp.bat import localhost -port 8000 -username user \
-password password -mode local -input_file_path example.xml \
-input_file_type aggregates -aggregate_record_element person \
-aggregate_uri_id last -output_uri_prefix /people/ \
-output_uri_suffix .xml \
-aggregate_record_namespace "http://marklogic.com/examples"
If I use approach 2 then does that mean that if I try to split the XML based on <Tx> node then around 6922 XML fragments will be created?
Please advise if my approach to fragment the XML file is correct or not?
Both will result in at least 6922 fragments, but the first approach will result in one document, with just one database uri. The second will result in 6922 document fragments, at 6922 database uris.
I'd recommend using the second approach. Fragment roots are not meant for cases like this.
HTH!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With