View Full Version : Displaying XML with either html or PHP

12-02-2008, 04:00 AM
I need a little assistance with taking an xml feed and displaying it on my page with a little formatting. I have been reading up on parsing with the dom parser however I can't figure out how I can format it on my page. Here is an example of my xml code.

<name>Houston Calls</name>
<from>New Jersey</from>
<label>Drive Thru</label>
<song>One More Won't Hurt</song>
<name>Fight Fair</name>
<label>Tooth and Nail</label>
<song>No Good News</song>
<name>Artist Vs Poet</name>
<song>Here We Go Again</song>
<from>New Jersey</from>

I need it to display an image then followed by the content. The image is a url provided by another site so I can't add it to my xml. If possible I want to display it in tables. Here is a simple paint image to get my drift how I want it to look. Here (http://www.forthesound.com/exampleparse.jpg).

I can create a basic javascript code however I can only display the xml in a list.

Alex Vincent
12-02-2008, 07:22 AM
It sounds like you want a combination of CSS and maybe XSLT. The XSLT might be able to query this other XML source for the image URL's, or it may be able to insert a XHTML script to do the querying for you.