xxdoubletxx
12-02-2008, 03: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.
<document>
<band>
<id>0</id>
<name>Houston Calls</name>
<from>New Jersey</from>
<label>Drive Thru</label>
<song>One More Won't Hurt</song>
</band>
<band>
<id>2</id>
<name>Fight Fair</name>
<from>California</from>
<label>Tooth and Nail</label>
<song>No Good News</song>
</band>
<band>
<id>3</id>
<name>Artist Vs Poet</name>
<from>Florida</from>
<label>Unsigned</label>
<song>Here We Go Again</song>
</band>
<band>
<id>4</id>
<name>Foster</name>
<from>New Jersey</from>
<label>Unsigned</label>
<song>Electra</song>
</band>
</document>
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.
<document>
<band>
<id>0</id>
<name>Houston Calls</name>
<from>New Jersey</from>
<label>Drive Thru</label>
<song>One More Won't Hurt</song>
</band>
<band>
<id>2</id>
<name>Fight Fair</name>
<from>California</from>
<label>Tooth and Nail</label>
<song>No Good News</song>
</band>
<band>
<id>3</id>
<name>Artist Vs Poet</name>
<from>Florida</from>
<label>Unsigned</label>
<song>Here We Go Again</song>
</band>
<band>
<id>4</id>
<name>Foster</name>
<from>New Jersey</from>
<label>Unsigned</label>
<song>Electra</song>
</band>
</document>
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.