I'll go ahead and add that it doesn't take that long to do, either.
I've already gotten familiar enough with REXML to rewrite this entire
script (and used less lines than the original to do so).

This was my first experience with manipulating XML, so I'm glad I
learned my lesson early before it affected a more important project!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris McMahon
Sent: Thursday, May 31, 2007 4:32 PM
To: [email protected]
Subject: Re: [Wtr-general] Script failing today, but worked yesterday?

> So, this shows that we've outgrown the current script and need 
> something more robust (probably proper parsing through REXML), and 
> that when you least expect it, consultants will throw a few landmines
under your scooter.

I'd like to underscore this point:

IF YOU HAVE XML, USE AN XML PARSER TO DEAL WITH IT.

I rarely shout, but using split() and gsub() and other
string-manipulation tools to handle XML will always go wrong
eventually.   Probably in a very expensive way, as this example shows.
 Take the time to learn REXML, it will save you immense trouble later.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to