Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: xml_split - split huge XML documents into smaller chunks

by Anonymous Monk
on Jan 20, 2009 at 10:42 UTC ( #737535=note: print w/ replies, xml ) Need Help??


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
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.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://737535]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-09-20 02:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls