|more useful options|
Re: How to implement XML languagesby ajt (Prior)
|on Jan 15, 2003 at 18:59 UTC||Need Help??|
Interesting question, hard to answer I fear.
Traditionally people attacking an XML problem in Perl, build a single purpose module based on an XML Parser, for example XML::RSS or RPC::XML or SOAP::Lite. The module can deal with all the logic of converting XML into Perl data structures, and converting Perl data structures back to XML. A quick hunt round CPAN will show that there are lots of these modules there already.
An alternative approach is to use Perl to handle the logistics, but let the data stay in XML. For example you can pretty much convert any kind of XML into XHTML or raw text quite easily with XSLT, you don't have to do it programmatically in Perl. As it happens Perl has some good SAX and XSLT technologies to use that are part of AxKit: XML::LibXML, XML::LibXSLT and XML::SAX. You just have to learn SAX or XSLT...
Whatever the reason, unless you have a pressing reason I would not use XML::Parser to base a new module on, the c library it's based on (expat) is getting old, and it does not fully support all the current standards, and it does not support emerging standards. Instead I'd look at XML::LibXML which is very fast and very modern.
Additional resources to look at:
Note: Bits of this post are shamlessly taken from earlier posts by me....