On Thursday 08 Apr 2010 02:52:38 Open Source wrote: > Thanks Shawn/Rob! I'll give a try now. one more thing, anyway to convert > these parsed output to html format directly with the help another module? >
You can try using XSLT: http://search.cpan.org/dist/XML-LibXSLT/ I should note that given an XML grammar, there are many ways to convert it to HTML/XHTML, and it's not something that a computer can guess (and often neither can a human). Regards, Shlomi Fish > > ----- Original Message ----- > > From: Shawn H Corey > > Sent: 04/08/10 04:00 AM > > To: Robert Wohlfarth > > Subject: Re: XML Parsing/Modules > > Robert Wohlfarth wrote: > > On Wed, Apr 7, 2010 at 2:39 PM, Open Source <open.sou...@gmx.com> wrote: > >> I'm new to perl and I need to parse an file which contains both > >> structured and unstructured XML messages. Can someone help me to > >> understand how to parse XML files/data into either simple readable or > >> html format? I'm not sure how to proceed like which module I've have to > >> use etc. any pointers would be much appreciated. > > > > I've used XML::Parser <http://search.cpan.org/dist/XML-Parser/Parser.pm> > > to do simple things. The documentation is here: > > http://search.cpan.org/dist/XML-Parser/Parser.pm. > > There are a number of XML parsers available on CPAN http://search.cpan.org/ > > The two most commonly use are: > > XML::Simple > http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm > > XML::LibXML http://search.cpan.org/~pajas/XML-LibXML-1.70/LibXML.pod > > Others are: > > XML::Twig http://search.cpan.org/~mirod/XML-Twig-3.34/Twig_pm.slow > > XML::SAX http://search.cpan.org/~grantm/XML-SAX-0.96/SAX.pm > > XML::DOM http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm > > All of these except XML::LibXML are built on top of XML::Parser. -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ "The Human Hacking Field Guide" - http://shlom.in/hhfg Deletionists delete Wikipedia articles that they consider lame. Chuck Norris deletes deletionists whom he considers lame. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/