xml


Posted on 16th Feb 2014 07:03 pm by admin

<?php

echo "<h1>XML Articles</h1>";

Did you know?Explore Trending and Topic pages for more stories like this.
$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?
No comments posted yet

Your Answer:

Login to answer
324 Like 51 Dislike
Previous forums Next forums
Other forums

Question handling xml data
Hello,

I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('

listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

Problems with adding a link to one position in a 'foreach' loop, please help
Hello!

Iam pretty new to programming and I wanna create a table with users from an array. It

Change Sort Order to Display Newest File First
Hi Guys,

I have a page that sorts the contents (PDFs) of a directory and displays them on the

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash