I need some help in embedding some content data from an external xml file into the body of an html page.
I am using the Typo3 based CMS to power my website (php/mysql), with a seo url extension that outputs all files as standard and static .html pages. I add content to each page through an Admin interface which allows entry through GUI based text formatting, or I can enter raw html into the body of the page.
Create a Top 5 Products Chart - Basically a box which lists the product name, image, price range, no. of reviews and link back to the product.
I have this data available in the form of a static xml file, ie. www.somesite.com/photography.xml
The file contents might look something remotely like this;
<title> Sony Cybershot DSC-W555</title>
&.. (similar to node 1 content)
I have created the html/css code (design aspect) to format and display static information like;
Sony Cyber-shot DSC-W55 Digital Camera - Silver
<img border="0" alt="product image" src="/images/products/sony
7" class="link-class"><img border="0" alt="rating stars" src="/products/images/star
s_5.gif" class="some-class" /><br/>(3 Reviews)</a></center>
span> - <span class="highprice">£224.69<
<span class="number-stores">5 Store(s)</span>
<a class="permalink-style" href="/products/photograph
<img border="0" alt="more info" src="/images/more-info.gif
<!-- top-products-container closing tag --></div>
The above is the html output example of displaying one product. In real terms, there would be about 5 instances of the above code. It looks fine when posted on a live html page, but my dilemma is that the product name, links, price, image etc.. is being updated daily, so I need to extract the information like url's, price amount etc and parse it in between the relevant places in the html code.
I have little knowledge of xml, so I would appreciate any ideas or tips on how to extract the price and url information (from www.somesite.com/photography.xml
) and display it between the matching div element in the html of the main page.