<?
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 ;
}
/ / Početak XML datoteku, odjek čvor roditelj
; echo '<items>';
echo "<predmet ';
. parseToXML ( stripslashes ( $sName )) . '" ' ; echo 'Ime = "" parseToXML (stripslashes ($ sName)).' ".";
. parseToXML ( stripslashes ( $sAddress )) . '" ' ; echo 'adresu = "" parseToXML (stripslashes ($ sAddress)).' ".";
. parseToXML ( $iPrice ) . '" ' ; To odjek cijena = "" parseToXML ($ iPrice). '".";
. parseToXML ( $sLink ) . '" ' ; echo 'link = "" parseToXML ($ slink).' ".";
. parseToXML ( stripslashes ( $tDetails )) . '" ' ; odjek "Pojedinosti =" "parseToXML (stripslashes ($ tDetails)). '". ";
. parseToXML ( stripslashes ( $sOther )) . '" ' ; odjek u okviru ostale = "". parseToXML (stripslashes ($ sOther)). "';
; echo '/>';
/ / Kraj XML datoteka
; echo "</ predmeti> ';
>













































