in reply to Re: Re: regex: deleting empty (x)html tags
in thread regex: deleting empty (x)html tags

Besides the fact that you never answered why you need to strip empty elements, or that you don't even seem to care about where they come from, i would say that given your set of constraints that you are stuck with the solution you have discovered for yourself. Personally, i strive to work in an environment where i control such issues, but then again, i am not developing "web tools" for the general public to use. My audience for my free code is experienced Perl programmers (i write CPAN modules) and i make a living by working for clients with specific needs.

If i were pushing this product out, i would look into bundling HTMLTidy along with the application, but that's just me. ;)

Best of luck to you, and if we help you in the future (you solved this one yourself ... this time >:)) and you make some money as a result of it, please don't be shy. ;)

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)
  • Comment on 3Re: regex: deleting empty (x)html tags

Replies are listed 'Best First'.
Re^4: regex: deleting empty (x)html tags
by CrysC (Novice) on Feb 15, 2004 at 20:37 UTC

    Sorry for not answering that -- well a) because the html cleaner/parser I've written (using HTML::PullParser) sometimes leaves them behind in unscrambling jumbled html (because it doesn't know the difference between <i>hjhk<b>hjhkj</i>hkjhk</b> and <i>kkp<b>ttyt</i></b> and reopens the b tag after the /i), and b) even if they were only there when the user/user's html generator left them in they're pointless (especially given how harshly I've cleaned the code otherwise), and take up extra space and bandwidth.

    And how exactly do you mean 'bundling' it? This application isn't tied to one os much less one type of hardware -- and you need to know that to provide a binary. A list of choices is just going to confuse them. *pictures self spending life helping people who downloaded the Win32 version because that's what their desktop is.* For a module or corprate application you can assume that the person installing it isn't totally braindead, and understands a little about the server -- there are days I want to stick my more braindead adminuser user cases in a firepit, unfortunately they're realistic. :|

    Thanks, and if I do, I will :) hell if I become less insolvent in general I prolly will whether or not this project makes money ;)