Shell script to split XML file

Hi,

I'm experiencing difficulty in loading an XML file to an Oracle destination table.I keep running into a memory problem due to the large size of the file.

I want to split the XML file into several smaller files based on the keyword(s)/tags : '' and '' and would like to use a Unix shell script to do that.

Any ideas how I can do this using a Shell script and is there any better way out there?

Thanks.

hi
Try to use split command.

You can split file based on number of lines, bytes and so on.

Thanks, I'm new to shell scripting, could you give me a sample of say, how to read an XML file for first instance of "<document>" and split the file till the next instance of "</document>" ? I need to move this data to a file for processing and keep splitting for the entire large file.

Thanks.