<?
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 ;
}
/ / Uruchom plik XML, węzeł rodzic echo
; echo '<items> ";
echo 'pozycja <';
. parseToXML ( stripslashes ( $sName )) . '" ' ; echo 'name = "" parseToXML (stripslashes ($ sName)).'. "';
. parseToXML ( stripslashes ( $sAddress )) . '" ' ; echo 'adres = "" parseToXML (stripslashes ($ sAddress)).'. "';
. parseToXML ( $iPrice ) . '" ' ; echo 'cena = "" parseToXML ($ iPrice).'. "';
. parseToXML ( $sLink ) . '" ' ; echo 'link = "" parseToXML ($ slink).'. "';
. parseToXML ( stripslashes ( $tDetails )) . '" ' ; echo 'dane = "' parseToXML (stripslashes ($ tDetails)). '."';
. parseToXML ( stripslashes ( $sOther )) . '" ' ; "inne = echo" '. parseToXML (stripslashes ($ sOther)).' "';
; echo '/>';
/ / Koniec pliku XML
; echo '</ przedmioty>';
?>













































