in reply to reading multiple xmls in a folder and to get tagvalues stored and then printed to HTML

This is a great job for XML::Simple, and here's an example of using it.

Hope this helps!

  • Comment on Re: reading multiple xmls in a folder and to get tagvalues stored and then printed to HTML
  • Download Code

Replies are listed 'Best First'.
Re^2: reading multiple xmls in a folder and to get tagvalues stored and then printed to HTML
by numberuno (Initiate) on Apr 27, 2012 at 02:52 UTC
    There is no example on how to read multiple XMLs and parse to HTML. The page just says "You could place this in a script to check multiple files in your XML folders." :(

      You have 3 tasks:

      1. read multiple files into memory
      2. parse those files via an XML parser
      3. do something with the parsed content (convert specific tag values to HTML
      XML::Simple merely accomplishes the second task. I recommend looking at Config::Any which will take care of tasks one AND two and you might not even need to do any heavy lifting to take care of the third task, but if you do there is always HTML::Template or Template::Toolkit.

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)