Using the xml_split and xml_grep that come with XML::Twig, you can do this in one (long!) line:
xml_split -l 1 tsplit.xml \ && perl -e'my @src= glob( "tsplit-*.xml"); \ foreach my $target (`xml_grep -t name tsplit-*.xml`) \ { chomp $target; \ my $src= shift @src; \ warn "rename $src, $target.xml\n"; \ rename $src, "$target.xml"; }'
Replace tsplit.xml by your file name of course.
In reply to Re: XML file to split
by mirod
in thread XML file to split
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |