<?
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 ;
}
/ / Inicio del archivo XML, el nodo eco padres
; echo '<items>';
'elemento <' eco;
. parseToXML ( stripslashes ( $sName )) . '" ' ; nombre = echo "" parseToXML (stripslashes ($ sName)). '".';
. parseToXML ( stripslashes ( $sAddress )) . '" ' ; 'address = echo "" parseToXML (stripslashes ($ sAddress)).' ". ';
. parseToXML ( $iPrice ) . '" ' ; "precio = echo" "parseToXML ($ iPrice). '".';
. parseToXML ( $sLink ) . '" ' ; 'link = echo "" parseToXML ($ slink).' ". ';
. parseToXML ( stripslashes ( $tDetails )) . '" ' ; echo 'detalles = "" parseToXML (stripslashes ($ tDetails)).' ". ';
. parseToXML ( stripslashes ( $sOther )) . '" ' ; '= otro eco ". parseToXML (stripslashes ($ sOther)).'" ';
; echo '/>';
/ / Fin del archivo XML
; echo '</ texto> ";
>













































