Are there restrictions on rendering XML?

0

I have a file of 960 records where each record has 175 fields, is a real estate form. When I ask to loop the 960 records with only 10 fields enabled, it generates an error in the XML as picture.

//Loopdosvaloresfor($i=0;$i<count($res)-1;$i++){$xml.='<Imovel>';$xml.="<DATA>".$res[$i]["Data cadastro"]."</DATA>";
    $xml.="<ENDERECO>".$res[$i]["Endereco"]."</ENDERECO>";
    $xml.="<BAIRRO>".$res[$i]["Bairro"]."</BAIRRO>";
    $xml.="<CIDADE>".$res[$i]["Cidade"]."</CIDADE>";
    $xml.="<UF>".$res[$i]["UF"]."</UF>";
    $xml.="<EMPREENDIMENTO>".$res[$i]["Empreendimento"]."</EMPREENDIMENTO>";
    $xml.="<NUMERO>".$res[$i]["Numero"]."</NUMERO>";
    $xml.="<PLACA>".$res[$i]["Referencia"]."</PLACA>";
    $xml.="<DORMITORIO>".$res[$i]["Dormitorio"]."</DORMITORIO>";
    $xml.="<SUITE>".$res[$i]["Suite"]."</SUITE>";
    ...

Already when I loop this just to get the first record, it returns a valid XML . Are there any restrictions regarding the generation of XML or can there be an error in the data?

    
asked by anonymous 06.09.2014 / 15:10

1 answer

2

There is no limitation, by error message your problem may be the presence of a & in some field.

You can try to replace all the & you have with &amp;

    
06.09.2014 / 15:26