[Chicago-talk] XML::Simple MXLout SuppressEmpty

Michael D. Stemle, Jr. manchicken at notsosoft.net
Thu Sep 28 09:31:35 PDT 2006


GnuPG signatures are good ^_^

On Thursday 28 September 2006 11:18, Kent Cowgill wrote:
> It's his PGP signature.
>
> -Kent Cowgill
>
> C2 Group, Inc.
> kent at c2group.net
> http://www.c2group.net
> 312.804.0160
>
> On Sep 28, 2006, at 11:13 AM, tiger peng wrote:
> > Then, I need an eraser :-).
> > What is the attachment 'file.bin'? I'd better erase
> > it.
> >
> >
> > --- "Michael D. Stemle, Jr."
> >
> > <manchicken at notsosoft.net> wrote:
> >> You may have to just weed it out manually...  I've
> >> never figured out how to
> >> get that to work...
> >>
> >> On Wednesday 27 September 2006 14:59, tiger peng
> >>
> >> wrote:
> >>> Hello all,
> >>>
> >>> Is there simple way to avoid an empty hash being
> >>
> >> shown
> >>
> >>> up as an empty element in XML with XML::Simple?
> >>> According to perldoc XML::Simple, the
> >>
> >> SuppressEmpty
> >>
> >>> only work for undef in XMLout.
> >>>
> >>> print Dumper($tree);
> >>> print XMLout($tree, SuppressEmpty => 1);
> >>>
> >>> $VAR1 = {
> >>>   'category' => {
> >>>     '301994' => {
> >>>       'level' => 2,
> >>>       'categroy' => {},
> >>>       'name' => Furniture',
> >>>       'code' => '301994'
> >>>       }
> >>>     }
> >>> };
> >>> <opt>
> >>>   <category name="Furniture" code="301994"
> >>
> >> level="2">
> >>
> >>>     <categroy></categroy>
> >>>   </category>
> >>> </opt>
> >>>
> >>> #Here is my ugly work-around:
> >>>  print XMLout(XMLin(XMLout($tree), SuppressEmpty
> >>
> >> =>
> >>
> >>> 1));
> >>> <opt>
> >>>   <category name="Furniture" code="301994"
> >>
> >> level="2"
> >>
> >>> />
> >>> </opt>
> >>>
> >>> _______________________________________________
> >>> Chicago-talk mailing list
> >>> Chicago-talk at pm.org
> >>> http://mail.pm.org/mailman/listinfo/chicago-talk
> >>
> >> --
> >> ~ Michael D. Stemle, Jr. <><
> >> (A)bort, (R)etry, (I)nfluence with large hammer
> >>
> >>> _______________________________________________
> >>
> >> Chicago-talk mailing list
> >> Chicago-talk at pm.org
> >> http://mail.pm.org/mailman/listinfo/chicago-talk
> >
> > _______________________________________________
> > Chicago-talk mailing list
> > Chicago-talk at pm.org
> > http://mail.pm.org/mailman/listinfo/chicago-talk
>
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk

-- 
~ Michael D. Stemle, Jr. <><
(A)bort, (R)etry, (I)nfluence with large hammer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20060928/9a972e8a/attachment.bin 


More information about the Chicago-talk mailing list