Replace old div content with new content
<p>I am developing video Player in which XML is my playlist.
Here is code:</p>

<pre><code>$crxml=file_get_contents('http://spoti.com/latest.xml/?lang=en');    
$rss=new SimpleXMLElement($crxml);
$playlistitem=1;
   foreach($rss-&gt;channel-&gt;item as $post)
    {   
    if($playlistitem&lt;=8)
    {    
    echo '&lt;ul&gt;';
    echo '&lt;li class="xtitle"&gt;'.$post-&gt;title.'&lt;/li&gt;';
    echo '&lt;li class="xdesc"&gt;'.$post-&gt;description.'&lt;/li&gt;';    
    $dc=$post-&gt;children('http://search.yahoo.com/mrss/');
    echo '&lt;li class="xthumb"&gt;'.$dc-&gt;thumbnail-&gt;attributes()-&gt;url.'&lt;/li&gt;';
    echo '&lt;li class="xpreview"&gt;'.$dc-&gt;thumbnail-&gt;attributes()-&gt;url.'&lt;/li&gt;'; 
    echo '&lt;li class="xsources_mp4"&gt;'.$dc-&gt;content-&gt;attributes()-&gt;url.'&lt;/li&gt;';
    $dc-&gt;content-&gt;attributes()-&gt;url=preg_replace('/.mp4/','.webm',$dc-&gt;content-attributes()-&gt;url);
     echo '&lt;li class="xsources_webm"&gt;'.$dc-&gt;content-&gt;attributes()-&gt;url.'&lt;/li&gt;';
     echo '&lt;/ul&gt;';
    $playlistitem++;
     }
</code></pre>

<p>I  want to replace the old content with new content when user click on Language all the entries replace with new entries </p>
