[Ask] PHP and XML
Posted: Thu Aug 03, 2006 5:25 am
feyd | Please use
Now, what I can't do is, how do you parse the <item> tag, the <title>,the <link>, and the <guid> inside the <item> using MagPie ?..
And lastly, how would it work if I want to distribute this XMLnodes Values into HTML table ? Should I create an Array first to store the nodes value, and then distribute those value using loops, or how ?
Thanks !
Chris
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Okay, I have downloaded the MagPieRSS, the latest version. And I know the basic how to parse XML file from the MagPie file. But I still have questions about how to parse the [color=green]<item>[/color] and all of its childnodes.
Let's say that I have a xml file like this:
[syntax="xml"]<rss version = "2.0">
<channel>
<title>Help me parsing XML using PHP</title>
<description>Please help me parsing XML</description>
<item>
<title>Florida Wins</title>
<link>http://www.somelinks.com/FloridaWins.php</link>
<guid isPermaLink="false">ad20060803000000</guid>
</item>
</channel>
</rss>And lastly, how would it work if I want to distribute this XMLnodes Values into HTML table ? Should I create an Array first to store the nodes value, and then distribute those value using loops, or how ?
Thanks !
Chris
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]