waider: (Default)
waider ([personal profile] waider) wrote2005-10-01 12:33 pm
Entry tags:

evil perl of the day

$out =~ s{<([^>]+)></\1>}{<$1 />}gs;

If you can figure out which switches will make XML::Simple do this automatically, please tell me, as the documentation consists of a terse statement of purpose for each option followed by a short example, neither of which is getting me around this problem.

Which is, obviously, to collapse an XML element <foo></foo> to its compressed form, <foo />.

Post a comment in response:

This account has disabled anonymous posting.
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org