in reply to Re: XML::Simple parsing :-(
in thread XML::Simple parsing :-(

Print the structure in YAML for debugging? IMHO, I don't think so.

The indentation problem of Data::Dumper is fixed with $Data::Dumper::Indent = 1; - not by using some other format that I'll bet most of us don't know. (After all, we know how to read perl hashes!) I don't know YAML, and given that XML is now Lingua Franca, I doubt I'll be learning it.

(And how would he produce the YAML output, assuming the modules exist, when his problem is that he can't get the XML to parse the way he wants? Another module to learn?)

--Bob Niederman, http://bob-n.com

Replies are listed 'Best First'.
Re: Re: Re: XML::Simple parsing :-(
by mirod (Canon) on Jun 20, 2003 at 16:29 UTC

    For what it's worth: YAML output looks very much like Data::Dumper output, but it is a lot more compact. In other words: you don't really need to "learn" YAML to read its output. I consider that it just makes more sense in most case to use YAML than to use Data::Dumper for debugging.

    BTW, learning enough about YAML to be able to use it for debugging would probably have taken you less time that writing this post (and wouldn't have resulted in --'s ;--).