Even the almighty gods don't think they can write well-formed XML using string concatenation, except in the most trivial cases. The almighty gods aren't substantially smarter than the rest of us - the one thing they have at their disposal to stop them seeming stupid is that they have XML libraries.
Thankfully the god Prometheus brought us XML::LibXML from the heavens. Use it; build your output as an XML tree structure, and then just call print $output->toString at the end.
Now, in your particular case, it may be that there's too much data to hold in memory at once, so constructing the entire tree in memory might be too much. However, there are various streaming XML output modules on CPAN too. I've not played with any of those enough to recommend one in particular.
In reply to Re: Processing XML with MediaWiki::DumpFile
by tobyink
in thread Processing XML with MediaWiki::DumpFile
by bitingduck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |