Parsing an RSS file using expat functions

From: Date: Wed, 22 Nov 2000 19:39:05 +0000
Subject: Parsing an RSS file using expat functions
Groups: php.general 
Request: Send a blank email to php-general+get-26691@lists.php.net to get a copy of this message
I just finished going over the php builder article on parsing an XML file and outputting HTML (good article: http://phpbuilder.com/columns/justin20000428.php3). I think I am grasping the concept somewhat, but I am confused about handling duplicate tags within different elements (that might be the wrong terminology) using PHP. For instance, given this as the body of an RSS file: <channel> <title>FoolYou News</title> <link>http://foolyou.com/news/</link> <description>News and Notes from around the web...</description> <language>en-us</language> <item> <title>Henderson Reports</title> <link>http://www.foo.org/henderson/</link> <description>Many interesting reports by John Henderson!</description> </item> I want the description of a channel to be rendered quite differently than the description of an item, but since they have the same name this doesn't seem possible? c

« previous php.general (#26691) next »