xml


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

<?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?

No comments posted yet

Your Answer:

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

$variable $variables type question
I need to be able to designate an array element dynamically, so I thought to use a variable variable

PHP Login
Hey!
I got this shopcart code online, am trying to modify it but am getting an error when i try a

Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error

[error]
Pars

Getting rid of quotes when printing data
Hi Guys, I use the filter_var FILTER_SANITIZE_STRING to filter the textarea input. The function esca

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

Apple's revamped lineup arrives

I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be nea

How to return to a previous page after running a PHP script
I'm having a bit of a melt down here because I think this should be really easy but can't work it ou

IDOC error
Hi, When i send IDOC from ECC system to MII there is no problem ECC side, i says message sent succe

Getting Resource id #11 while trying to connect..
So i tried using "DEFINE" for the first time and im using the variables i defined to conne

Help with Hyperlink
Hi,

What I am trying to do may be simple, I just can't get it to work. Ok...

I am usin

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