Phlip
3/25/2009 6:10:00 PM
Arun Kumar wrote:
> The problem is that my boss donot want me to use any libraries to parse
> xml. He also said to use regular expressions to extract the contents of
> an xml tag. Can u please tell me how to do it. I'll be really greatfull.
Your boss is micromanaging you, and does not understand the relationship between
Ruby, its libraries, and its programmers. Bosses generally should not prohibit
valid techniques for bogus reasons.
That said, you could use "malicious compliance", and show her or him how fragile
regular expressions are. (Write unit tests that fail for the wrong XML, for
example.)
Or you could explain that REXML is not an _external_ library. It comes with
Ruby, so it's "free" to use. You never need to download and install it...