in reply to XML::Parser question

For starters, the XML::XXXXX modules probably won't parse that "xml" document in the first place. You have a </a> tag in there with no opening tag. Deleting that will fix the xml-format problem, but as for the html side of it, the <font> is formatted incorrectly. The pound sign (#) should be inside the quotes. XML::XXXXX won't complain about the latter one though.

If you vaporize that </a> tag, then you might find XML::Simple to be enough for this task:

#!/usr/bin/perl -w use strict; use XML::Simple; my $data = XMLin(qq{ <item> <title>test</title> <description><b><font color="#dd0000">temp</font></b> try</description +> <link>http://www.nowhere.com</link> </item> }); print $data->{'title'}, " | ", $data->{'link'}, "\n";


If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, reply to this node or /msg me to tell me what is wrong with the post, so that I may update the node to the best of my ability. If you do not inform me as to why the post deserved a downvote, your vote does not have any significance and will be disregarded.