There's more than one way to do things | |
PerlMonks |
Re: The best way to handle different type of XML filesby pajout (Curate) |
on Nov 23, 2009 at 13:11 UTC ( [id://808804]=note: print w/replies, xml ) | Need Help?? |
It is hard to choose some tool, because you never know all formats which you have to process... It is my experience of very similar situation. The crucial question is "How to implement my logic on various, mostly unpredictable data structures?". I think that XML::Simple is good for the simplest examples. It needs some experience with that tools, but consider XML::Twig, XML::Rules, tools performing xslt transformation or more generally, using XPath lang, iterating DOM structure, iterating object structure of XML::Trivial (my kid :) or, for instance, more esoteric STX language, http://stx.sourceforge.net/ . Principially, you can spare some work using some "scripting" language, which is oriented for xml processing (xslt, stx, xpath), but you can loose some power. And oppositely using Perl, iterating through Perl data/object representation of the document. Another problem could be processing of huge documents. In this case XML::Twig or stx can work for you, but consider raw processing of some XML::Parser output too.
In Section
Seekers of Perl Wisdom
|
|