Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hey, hey, calm down everybody!

I do agree that the attitude of the XML community and of the Perl community are really different, to the point of being antagonistic, as proven by the 2 posts above. The Perl way is "whatever works is fine", convenience tends to be valued above completeness and formalism. The XML way is nearly the opposite: one-format fits all, forcing "the right way" unto unsuspecting coders (Unicode isa perfect example, it annoys 99% of people to no end while just slightly improving the condition of the last 1%), elaborate all-encompassing constructs (W3C Schemas).

Plus of course XML is verbose, and monsters like XSLT and W3C schemas are way worse, while Perl favors economy of strokes and conciseness as a way to get elegance and maintenability. At least you could do SGML golf!

I might be wrong, of course no one has any figure about module usage, but I believe the people who write Perl modules "the XML way", like Matt, Robin Berjon, Ilya Sterin etc... are in a way off-target. In a word they look a bit like XML nationals lost in a foreign Perl country (not that Perl people look terribly good when we go out and attend XML conferences, believe me! I tend to get laughed at when I describe XML::Twig to Real XML Gurus ;--). The modules they write are not what the Perl community wants. Not that their work has no value, I think it is really important for Perl to be used in other context and to spread past its current niche, but it might be something to think about when we try to understand why some very nice modules don't seem to be used much. In any case there is a reason why the current crowd of Perl hackers loves XML::Simple and refuses to use XML::SAX::PurePerl. Java drones want SAX, Perl hackers want XML::Simple (and don't get me wrong, I would be the first to say that I don't think XML::Simple is a generic XML tool, but it is darn convenient!).

I know that XML is annoying as it oftens bring no improvement over home-brewed formats. It is usually imposed by management in order to be buzzword compliant, but for Perl hackers it brings very little to the table, except an additional risk. But let's face it, we will all have to deal with it. XML is a bastard, verbose and actually quite tricky, format that's being used not because it is the best one for any particular purpose but because it is a standard, which allows Java projects to re-use standard SUN or IBM libraries where Perl hackers would use a CPAN module or 2 lines of custom code.

That said I see a couple of reasons why Perl hackers would want to use XML: first as a data format it is actually quite powerful. It makes it easy to stick HTML inside data, it makes it easy to mark data within HTML text. It makes it possible to change the structure of the data without upgrading the code right away (I guess that would be between "loosely coupled systems"), really, you should try it ;--)


In reply to Re: Re: Re (tilly) 2: Why is Perl so bad with XML? by mirod
in thread Why is Perl so bad with XML? by ajt

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (4)
    As of 2018-12-19 01:00 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How many stories does it take before you've heard them all?







      Results (83 votes). Check out past polls.

      Notices?