develooper Front page | perl.beginners | Postings from October 2009

Re: xml simple question

Thread Previous
From:
Shlomi Fish
Date:
October 23, 2009 13:09
Subject:
Re: xml simple question
Message ID:
200910232208.55596.shlomif@iglu.org.il
On Friday 23 Oct 2009 15:16:15 Shawn H Corey wrote:
> getget wrote:
> > The content of 2 files output.xml and input.xml are different. How can
> > I create the output file its content the same with input.xml.
> 
> Use a different parser than XML::Simple.  I suggest XML::Twig.
> 
> XML::Simple does not distinguish between attributes and content.
> Because of this, it does not reproduce XML accurately.  It's good if all
> you want to do is read XML but if use want to write it, use something
> different.
> 

I can second that. XML::Simple has inherent philosophical design problems and 
I never use it or waste my time to support people using it.

Risking making the "use qmail instead" syndrome (see:
http://www.shlomifish.org/philosophy/computers/web/use-qmail-instead/ ), I 
hereby tell you - don't use XML::Simple if you value your sanity. It does not 
truly handle XML and is anything but simple.

Regards,

	Shlomi Fish, who now maintains XML-RSS which has many XML-Simple'isms, 
despite the fact that it doesn't use it, and that some people want even more 
XML-Simple'isms to support the various brain-damaged RSS extensions that one 
can find in the wild.

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Rethinking CPAN - http://shlom.in/rethinking-cpan

Chuck Norris read the entire English Wikipedia in 24 hours. Twice.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About