XML file to be split into 3 XML files
Phie
-
lami20j Posted messages 21506 Registration date Status Moderator, Security Contributor Last intervention -
lami20j Posted messages 21506 Registration date Status Moderator, Security Contributor Last intervention -
Hello,
I want to split a xml file into three xml files of roughly equal size.
I tried the function csplit -f fic_ test.xml '/<riskAggregatedMessage>/' '{*}' and I have two problems:
1) this function gives me one file per record instead of correctly splitting into 3 files with respect to the tags... this forces me to concatenate the files afterwards... if I could avoid that, it would be great!
2) the option '{*}' does not work. I get the following error message: "csplit: Illegal repeat count: {*}"
Why?
Thanks in advance!
phie
I want to split a xml file into three xml files of roughly equal size.
I tried the function csplit -f fic_ test.xml '/<riskAggregatedMessage>/' '{*}' and I have two problems:
1) this function gives me one file per record instead of correctly splitting into 3 files with respect to the tags... this forces me to concatenate the files afterwards... if I could avoid that, it would be great!
2) the option '{*}' does not work. I get the following error message: "csplit: Illegal repeat count: {*}"
Why?
Thanks in advance!
phie
Configuration: Windows XP Firefox 2.0.0.11
I had indeed seen this option, but the problem is that the file I want to split is an XML file, so I cannot split it based on size or number of lines: I could have an open tag in the first file and a closed one in the second...