Perl-Sensitive Sunglasses | |
PerlMonks |
Parsing and converting HTMLby tevolo (Novice) |
on Jul 26, 2012 at 18:40 UTC ( [id://983906]=perlquestion: print w/replies, xml ) | Need Help?? |
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
Back to
Seekers of Perl Wisdom
|
|