0 Replies Latest reply on Aug 8, 2011 1:44 AM by isabelle loyer

    HTTPService e4x Error #1095: XML parser failure: Unterminated attribute

    isabelle loyer Level 1

      Dear Flexer,

       

      I'd like to load data from my database with an httpservice and result on e4x format.

       

      If on php side, I add only 12 row all works well, but if I try to load more than 12 rows this errror appear Error #1095: XML parser failure: Unterminated attribute.

       

       

      Can you help me to solve that?

       

      Thanks

       

       

      ******  My Php code **********

       

      <?php

      require_once ('MySQL.php');

      require_once ('conf.php');

      include('functions.php');

       

      // On commence par récupérer les champs

      //if(isset($_POST['idPatient']))     

      //$id=$_POST['idPatient'];

       

       

      $link = mysql_connect(DB_HOST,DB_USER, DB_PWD);

      mysql_select_db(DB_DATABASE, $link);

       

      $query = "SELECT 20Customer_1012.paIndex, 20Customer_1012.paNomU, 20Customer_1012.paPrenom,20Customer_1012.paDossier1, 20Customer_1012.paDossier2, 20Customer_1012.paNaissance, 20Customer_1012.paSexe, 20Customer_1012.paT_Qualite_P, 20Customer_1012.paNomPar,20Customer_1012.paPrenomPar, 20Customer_1012.T_AdrDefaut_P, 20Customer_1012.paAdress1,20Customer_1012.paAdress2,20Customer_1012.paCodePostal,20Custom er_1012.paT_Ville_P,20Customer_1012.paPays,20Customer_1012.pa1T_TypeTel_P,20Customer_1012. paSMS1,20Customer_1012.paNumTel1,20Customer_1012.paRemTel1,20Customer_1012.pa2T_TypeTel_P, 20Customer_1012.paSMS2,20Customer_1012.paNumTel2,20Customer_1012.paRemTel2,20Customer_1012 .pa3T_TypeTel_P,20Customer_1012.paSMS3,20Customer_1012.paNumTel3,20Customer_1012.paRemTel3 ,20Customer_1012.paFax,20Customer_1012.paEMail, 20Customer_1012.paProfMere, 20Customer_1012.paProfPatient, 20Customer_1012.paProfParent, 20Customer_1012.paUserZoneA1, 20Customer_1012.paUserZoneA2, 20Customer_1012.paUserZoneA3, 20Customer_1012.paUserZoneA4, 20Customer_1012.paUserZoneA5, 20Customer_1012.paUserZoneA6, 30Traitemnt_201223.ttTStatutP, 30Traitemnt_201223.ttDateStatut, 12Praticien_02.prInitiales, 20Customer_1012.pa2T_Qualite_P

      FROM 20Customer_1012

      JOIN 30Traitemnt_201223 ON 20Customer_1012.paIndex = 30Traitemnt_201223.ttIndex

      JOIN 12Praticien_02 ON 30Traitemnt_201223.ttPraticien = 12Praticien_02.prIndex

      WHERE 20Customer_1012.paIndex='16'";

       

       

      $recordset = mysql_query($query, $link);

       

      $dom = new DOMDocument('1.0', 'UTF-8');

      $rootNode= $dom->appendChild($dom->createElement('OrthoExpertDB'));

       

      while($row_recordset = mysql_fetch_array($recordset))

      {

       

      $record = new DomElement("p", "");

      $rootNode->appendChild($record);

      $record->SetAttribute("id", $row_recordset[0]); //index

       

      $record->SetAttribute("nU", $row_recordset[1]);//nom U

      $record->SetAttribute("pr", $row_recordset[2]);//prenom

      $record->SetAttribute("d1", $row_recordset[3]);//dossier1

      $record->SetAttribute("d2", $row_recordset[4]);//dossier2

      $record->SetAttribute("dn", datefr($row_recordset[5]));//naissance

      $record->SetAttribute("sx", $row_recordset[6]); //sexe

      $record->SetAttribute("paQ", $row_recordset[7]); //qualite patient

      $record->SetAttribute("nPar", $row_recordset[8]);

      $record->SetAttribute("pPar", $row_recordset[9]);

      $record->SetAttribute("adD", $row_recordset[10]);

      $record->SetAttribute("ad1", $row_recordset[11]);

      $record->SetAttribute("ad2", $row_recordset[12]);

      $record->SetAttribute("cp", $row_recordset[13]);//code postal

      $record->SetAttribute("vi", $row_recordset[14]);

      $record->SetAttribute("pi", $row_recordset[15]);

      $record->SetAttribute("tT1", $row_recordset[16]);

      $record->SetAttribute("sms1", $row_recordset[17]);

      $record->SetAttribute("nT1", $row_recordset[18]);

      $record->SetAttribute("rT1", $row_recordset[19]);

       

      $record->SetAttribute("tT2", $row_recordset[20]);

      $record->SetAttribute("sms2", $row_recordset[21]);

      $record->SetAttribute("nT2", $row_recordset[22]);

      $record->SetAttribute("rT2", $row_recordset[23]);

       

      $record->SetAttribute("tT3", $row_recordset[24]);

      $record->SetAttribute("sms3", $row_recordset[25]);

      $record->SetAttribute("nT3", $row_recordset[26]);

      $record->SetAttribute("rT3", $row_recordset[27]);

      $record->SetAttribute("fax", $row_recordset[28]);

      $record->SetAttribute("mail", $row_recordset[29]);

      $record->SetAttribute("prPa", $row_recordset[30]);

      $record->SetAttribute("prP", $row_recordset[31]);

      $record->SetAttribute("prMe", $row_recordset[32]);

      $record->SetAttribute("zA1", $row_recordset[33]);

      $record->SetAttribute("zA2", $row_recordset[34]);

      $record->SetAttribute("zA3", $row_recordset[35]);

      $record->SetAttribute("zA4", $row_recordset[36]);

      $record->SetAttribute("zA5", $row_recordset[37]);

      $record->SetAttribute("zA6", $row_recordset[38]);

       

      $record->SetAttribute("st", $row_recordset[39]);//statut

      $record->SetAttribute("dst", $row_recordset[40]);//date statut

      $record->SetAttribute("pr2", $row_recordset[41]);//initiale prat

      $record->SetAttribute("parQ", $row_recordset[42]);//qualité parent

       

      }

      mysql_free_result($recordset);

      mysql_close();

       

       

      print $dom->saveXML();

      //echo $xmlStr;

      ?>

       

       

      ****** End of php