in reply to Re: xml_split - split huge XML documents into smaller chunks
in thread xml_split - split huge XML documents into smaller chunks

Hi, Instead of putting each section in to a each file, can I put some first 1000 sections in one file, and next 1000 in other file and so on. When there are 16000 sections so many files getting created in hard to handle them.
  • Comment on Re^2: xml_split - split huge XML documents into smaller chunks

Replies are listed 'Best First'.
Re^3: xml_split - split huge XML documents into smaller chunks
by mirod (Canon) on Feb 07, 2009 at 10:17 UTC

    Sorry I did not see this follow-up. Yes you can. In recent versions of xml_split, the -g or the -s options should give you what you need:

      -s <size>
           generates files of (approximately) <size>. The 
           content of each file is enclosed 
           in a new element ("xml_split::root"), so it’s 
           well-formed XML.  The size can be given in bytes,
           Kb, Mb or Gb.
    
       -g <nb>
           groups <nb> elements in a single file. The content
          of each file is enclosed in a new element 
         ("xml_split::root"), so it’s well-formed XML.