title: BASH SHELL SCRIPT to split a big xml file into multiple small files
body: <p>I have a an XML file in below format</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;parent&gt;
      &lt;child&gt;
          &lt;code&gt;&lt;/code&gt;
          &lt;text&gt;&lt;/text&gt;
      &lt;/child&gt;
      &lt;child&gt;
          &lt;code&gt;&lt;/code&gt;
          &lt;text&gt;&lt;/text&gt;
      &lt;/child&gt;
   &lt;/parent&gt;
  </code></pre>
  
  <p>I need a BASH SHELL script to split this main xml file into multiple small XML files which should have contents from the <code>&lt;child&gt;</code> to <code>&lt;/child&gt;</code> tag. File names could be parent file name plus a running serial number such as _1 for ex:20110721_1.xml etc..
  Please help me with the script.</p>