in reply to XML::Simple problem, or How to convert HTML to Perl and then back again.

XML::Simple is meant for simple XML, mainly for use in XML-based configuration files, where the format is known ahead of time. It has some extra tricks, involving the way attributes and elements can be interchanged for attributes with certain magic names , 'id' being one of them.

It's not made for genral parsing projects and since much HTML that will work as HTML in a browser isn't well-formed XML, XML::Simple is probably not the tool for this application.

--Bob Niederman, http://bob-n.com
  • Comment on Re: XML::Simple problem, or How to convert HTML to Perl and then back again.