Or *maybe* not. I'm not sure. The link you give says it's *alpha* quality, and I wouldn't use alpha quality stuff:
XML::Dumper : Perl module for dumping Perl objects from/to XML [ docum +entation ]Contained in the XML-Dumper-0.4 distribution Download / quickinstall XML-Dumper-0.4.tar.gz Size: 4.732 kB Last modified: Jun 20, 1999 CPAN id: E/EI/EISEN Version: 0.4 DSLI (development, support, language, interface) informat +ion: Development: Alpha testing Support: Mailing-list Language: Perl only, no compiler needed, should be platform independe +nt Interface: Object oriented using blessed references and/or inheritanc +e

Ok, that argument didn't sound too strong in my opinion, so I did some testing:

F:\dev\>perl -MXML::Dumper -e"print XML::Dumper->new()->pl2xml({ {a,bl +ess {}, 'Foo'},{1,[1,2,3]}})" <perldata> <hash> <item key="HASH(0x17655c4)"> <hash> <item key="1"> <array> <item key="0">1</item> <item key="1">2</item> <item key="2">3</item> </array> </item> </hash> </item> </hash> </perldata> F:\dev\>perl -MData::DumpXML=dump_xml -e"print dump_xml({ {a,bless {}, + 'Fo o'},{1,[1,2,3]}})" <?xml version="1.0" encoding="US-ASCII"?> <!DOCTYPE data SYSTEM "dumpxml.dtd"> <data> <ref> <hash> <key>HASH(0x17655a8)</key> <ref> <hash> <key>1</key> <ref> <array> <str>1</str> <str>2</str> <str>3</str></array></ref> </hash></ref> </hash></ref></data> F:\dev\>
So my conclusion is that XML::Dumper just dumps a bunch of xml (no DTD), and Data::DumpXML has a somewhat retarded interface (has one function, doesn't export it by default). Data::DumpXML includes Data::DumpXML::Parser for reading back the values, while XML::Dumper does it both. Either look good, although I would opt for Data::DumpXML, simply because of the DTD (and also because Giselle Ans *is* maintaining it). However, I would patch both of them to use, non oo interfaces. They would both export two functions: Dumper, and Thumper (or Undumper, Dumperun, Dumpun, punDump,...)

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"


In reply to Re: Re: XML-ish Data::Dumper? by crazyinsomniac
in thread XML-ish Data::Dumper? by agelina

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.