in reply to XML file to split
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.
|
|---|