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

I've concidered sending it back though HTML::PullParser a second time to remove the empty tags, but that seems like quite a bit of excess processing simply to remove empty tags.

I could be wrong though -- just because it will take on the order of 20 times as much code as the regex doesn't mean it will actually be slower.

Edit: This is document fragment with no containing tag, so any of the tree-based parsers will barf afaik

Edit2: I'm not refusing to concider non-regex solutions, it's just that loading yet another parser or going though HTML::PullParser again doesn't seem to be a very efficent way of doing it...

  • Comment on Re: Re: regex: deleting empty (x)html tags