Posted on 2007-07-04 10:19:56-07 by mirod in response to 5601
Re: Coalescing adjacent #PCDATA elements?

Sorry for the delay, I missed your answer.

Indeed it makes sense to try to keep the trees normalized. It should also be more efficient than doing it "after the fact". I have to go through the (long!) list of methods and see which ones would need to check. Beyond cut and unwrap (erase is just an alias for unwrap) and methods which use those, I can think of set_tag (if you set to '#PCDATA'), set_content maybe (I have to check). I'll let you know when I have an updated version.

Thanks for the idea

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.