I have no idea of what is going wrong, i was using this same script to get another XML and it was working just fine.This is the script:\[code\]<?phpheader("Content-type: text/xml");echo "<?xml version=\"1.0\" encoding=\"LATIN-1\"?>";echo "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">";echo "<plist version=\"1.0\">";function getXML($sql="SELECT IDCargo FROM database.table"){ $conn = mysql_connect ("myserverurl.com", "user", "psw"); $db = mysql_select_db("database"); $result = mysql_query($sql, $conn); $column = ""; echo "<array>"; while($row = mysql_fetch_assoc($result)){ $column .= "<dict>"; foreach ($row as $key => $value){ $column .= "<key>$key</key>"; $column .= "<string>$value</string>"; } $column .= "</dict>"; } echo $column; echo "</array>"; echo "</plist>";}getXML("SELECT IDCargo as ID_CARGO, SequencialDoCandidato as NUMERO_SEQ_CANDIDATO, NomeDoCandidato AS NOME_CANDIDATO, NumeroDoCandidato as NUMERO_CANDIDATO, NomeDoPartido AS SIGLA_PARTIDO, Estado as SIGLA_ESTADO,IDUnidadeEleitoral AS ID_CIDADE_CANDIDATO, UnidadeEleitoral AS CIDADE_CANDIDATO FROM database.table");mysql_close();?>\[/code\]It brings this error:\[code\]This page contains the following errors:error on line 1 at column 538: Encoding errorBelow is a rendering of the page up to the first error.ID_CARGO11NUMERO_SEQ_CANDIDATO10000002965NOME_CANDIDATOAGRECINO DE SOUSANUMERO_CANDIDATO13SIGLA_PARTIDOPTSIGLA_ESTADOACID_CIDADE_CANDIDATO1120CIDADE_CANDIDATO\[/code\]Can anyone see anything? Give me some help here, please.I got the script from one that was working just fine.