Alisha123 Posted November 23, 2009 Share Posted November 23, 2009 <?php echo "<h1>XML Articles</h1>"; $home="http://xml.x-alt.com/"; // load the studentphones.xml file $channel = simpleXML_load_file('http://xml.x-alt.com/'); // draw a table and column headers echo "<table border=\"1\">"; //echo "<th>Grade</td><th>Result</th>\n"; // iterate through the grade nodes displaying the contents foreach ($channel->item as $channel) { echo "<tr>"; echo "<td><a href=" . $home . $channel->link . ">" . $channel->title . "</a>" . "</td>" ; echo "</tr>"; echo "<tr>"; echo "<td>{$channel->category}</td>"; echo "</tr>"; echo "<tr>"; echo "<td>{$channel->description}</td>"; echo "</tr>"; echo "<tr>"; echo "<td>{$channel->link}</td>"; echo "</tr>\n"; } echo "</table>"; ?> Here I am using a rss feed to display list of articles and the title of the artcles are links that directs the user to the original destination of the article and displays it in full, but i want to display the artcles in my webpage. How can I do this? Do i need to use SOAP? Link to comment https://forums.phpfreaks.com/topic/182653-xml/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.