<?
function parseToXML ( $htmlStr )
{
$xmlStr = str_replace ( '<' , '<' , $htmlStr );
$xmlStr = str_replace ( '>' , '>' , $xmlStr );
$xmlStr = str_replace ( '"' , '"' , $xmlStr );
$xmlStr = str_replace ( "'" , ''' , $xmlStr );
$xmlStr = str_replace ( "&" , '&' , $xmlStr );
return $xmlStr ;
}
/ / Start XML-fil, eko modernod
; echo "<items> ';
echo "<posten ';
. parseToXML ( stripslashes ( $sName )) . '" ' ; echo 'name = "' parseToXML (stripslashes ($ sNAME)). '."';
. parseToXML ( stripslashes ( $sAddress )) . '" ' ; echo 'address = "' parseToXML (stripslashes ($ sAddress)). '."';
. parseToXML ( $iPrice ) . '" ' ; echo "pris =" 'parseToXML ($ iPrice).'. "';
. parseToXML ( $sLink ) . '" ' ; echo 'link = "' parseToXML ($ slink). '."';
. parseToXML ( stripslashes ( $tDetails )) . '" ' ; eko "detaljer =" 'parseToXML (stripslashes ($ tDetails)).'. "';
. parseToXML ( stripslashes ( $sOther )) . '" ' ; echo "andra =" ". parseToXML (stripslashes ($ sOther)). '"';
; echo '/>';
/ / End XML-fil
; echo "</ objekt> ';
?>













































