[Html-widget] Formatting of $result.as_xml

Carl Franks fireartist at gmail.com
Tue Oct 3 22:02:06 CEST 2006


Okay, so I lied about not getting near a computer this week ;)
But the line /will/ be disconnected on Friday

On 03/10/06, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
> I found it utterly difficult to deal with the output of $result.as_xml when
> debugging.  Wouldn't it be usefull if there was an option to set some nice
> formatting there?

Yes, but there's probably as many different methods of debugging as
there are programmers.

I have a script that I pipe output through to tidy up html.
Or sometimes I change
print $r->as_xml;
to
print join "\n", split /(?=<)/, $r->as_xml;

Any suggestion on a method which might be useful enough for a
reasonable percentage of users?

If you're using Catalyst, I think there's a plugin which prettyfies html.

Carl



More information about the Html-widget mailing list