Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Processing Two XML Files in Parallel

by tinita (Parson)
on Jul 23, 2011 at 12:15 UTC ( #916308=note: print w/ replies, xml ) Need Help??


in reply to Re: Processing Two XML Files in Parallel
in thread Processing Two XML Files in Parallel

So you like catch phrases, uh?
Let me tell you something:
In about 97% of the time, parsing XML with regexes is the root of all evil. The remaining 3% are left for one-time, quick & dirty scripts and maybe some special cases (where you can assure the XML will stay exactly like that).
Let me tell you why:
The creator of the XML to parse might change it. All elements might be on one line. Maybe there will be some empty lines between the tags. Maybe the elem tags will get attributes in the future. In all cases your script will suddenly stop to work, although the actual content you want didn't change. And somebody has to fix it quickly. In the end it's more work then just doing it right from the beginning, and potentially you annoyed a customer and your boss.

That's how experienced programmers think. Because they know that things like that happen.
You not only posted a quick & dirty solution, you even bashed someone for posting a clean and correct solution. A quick & dirty solution is ok (although it would be nice to comment that it depends on the exact XML format), and you actually got some ++ for it, but then bashing someone elses correct solution is just infantile.


Comment on Re^2: Processing Two XML Files in Parallel
Re^3: Processing Two XML Files in Parallel
by Logicus on Jul 23, 2011 at 15:42 UTC
    Hey man I asked before hand if the lines had 1-to-1 concurrency, and I didn;t bash anyone ~I asked WHY. So now you told me WHY i'm happy... THNAK YOU

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://916308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-07-22 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (120 votes), past polls