Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I hate seeing questions like this, as it perpetuates a myth, like Mirod's lightning talk. Perl is not bad with XML. It really rocks at it. It has some of the most powerful tools for handling XML in the entire industry (check out SAX::Machines if you don't believe me), and has some of the leading minds on the subject who use Perl for XML munging all the time (Tim Bray for one). So if you're looking for a problem with Perl and XML you'll only find one: you.

Thats right, because the general perl hacker's attitude about XML sucks. They see it as overhyped (which it is) and unweildy (which it can be) and hard to learn all the different acronyms (which is true too). But the hype and the unweildyness and the acronym fear that Perl hackers see simply gives way to the Java hackers, who aren't afraid of this stuff.

I hear people complaining about CPAN's XML module situation for example: "How do I decide what to use?". Yet they didn't consider going right to the source of the matter: Now on the only regular monthly technical column is on guess what? That's right, Perl and XML. Kip even did a whole series of articles untangling the mass of modules on CPAN. Now try Java. Where do you go for a package that will let you work on a stream in a tree-like way (a-la Twig)? They have no CPAN, you have to go hunting, or be "in the know".

So I'll turn it around... Why do the Perl XML hackers need so little information (books, tutorials, etc) about Perl and XML? Well because it's so damned simple that's why! Want to parse some XML into a structure? "XMLin()". Want a fast DOM with XPath support? "XML::LibXML". Want SAX parsing? "XML::SAX". The answers are easy for perl hackers, and so we just get our jobs done.

But make no mistake - perl is a lot less popular than Java is these days. AxKit vs Cocoon is the perfect case in point. Our -devel list has 70 people on. Cocoon's has over 500, and a lot of the people working on Cocoon are from commercial companies like HP and Sun (HP just submitted a massive patch to enable some funky SOAP stuff, for example). So your question really says a lot more about Perl than it does about Perl and XML. You could ask the very same question about "Perl and Databases" (e.g. there are lots of books on ODBC, JDBC and ADO, but only one on the Perl DBI). Or about "Perl and I/O" (yes, there really is a whole book dedicated to I/O in Java, maybe more than one).

Go back to work. Nothing to worry about here. Unless you mean about Perl's overall popularity, in which case sure you can worry. But we'll never be a Java or a C#, we just don't have the marketing muscle.

In reply to Re: Why is Perl so bad with XML? by Matts
in thread Why is Perl so bad with XML? by ajt

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2022-01-19 09:25 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (55 votes). Check out past polls.