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

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Match stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

Strange array issue, never happened before.
mysql_fetch_array returns 1 array per call. Generally that's why it is inserted into a while statem

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

Memory Allocation
Hi folks,
see this ex:

int v=5;
v=v+10;

then what will do the compiler before th

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

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