I would actually use awk for this. It should look like:<br><br>awk '/^<description>/,/^<\/description>/p' | awk '!/^<\/{0,1}description>/p'<br><br>There's probably a way to combine the two commands, but this does it just fine.
<br><br>In shell you could do:<br><br>for i in description procedure reference<br>do<br> awk "/^<$i>/,/^<\/$i>/p" | awk "!/^<\/{0,1}$i>/" > datafile-$i.txt<br>done<br><br><br>Chris
<br><br>