tevolo has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks. I am looking for suggestions/guidance on a problem I am working on.
I have multiple html files that are all slightly different and may contain different tags in each. I want to parse them and convert the tags to a string based on certain rules. For instance:
<p> some text </p>Would get converted to text="some text" At first I was doing this will loops and arrays and regex but the code quickly started growing out of control. Then I tried HTML::TREEBUILDER but it didn't seem to work with the tags the way I needed.
Any advice would be greatly appreciated
Thanks in advannce
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing and converting HTML
by aitap (Curate) on Jul 26, 2012 at 18:50 UTC | |
by tevolo (Novice) on Jul 26, 2012 at 23:54 UTC | |
by aitap (Curate) on Jul 27, 2012 at 07:28 UTC | |
by Anonymous Monk on Jul 26, 2012 at 23:59 UTC | |
by tevolo (Novice) on Jul 26, 2012 at 19:15 UTC |