Why doesn't XML::RSS encode entities automatically when outputting XML? (or with a flag?) If I parse an RSS file with XML::RSS I get a nice datastructure out that I can tweak and play with, but if I want to pass that datastructure back into XML::RSS I have to worry about walking the mess of nested hashes, and re-encoding every stray ampersand.
Not so hard you say? True. Simply in fact. I can cut and paste lines 658 thru 897 out of XML::RSS and into my script, and then add a handful of calls to encode(). Somehow though, cutting and pasting 240 lines into my script seems the wrong way to go.
Is there a logic behind this that I'm missing? In general its a very nice module, and I feel like maybe I'm over looking a perfectly valid reason for building a tool that encourages broken XML.
Any insights appreciated. Thanks.
Entittitties (Score:2)
I've wondered that, myself, many times. But I was (and am) too lazy to cook up a simple "see, look at this" test case to mail to the author.
Re:Entittitties (Score:1)
I got email from someone who says they have a DWIM patch. If that falls through and I can't find a good reason for the current behaviour I'll write one.