title: Qextserialport breaks my xml
body: <p>I am trying to rewrite in c++ an application written in python.</p>
  
  <p>All it does is to open a serial port and read some xml. In python i was using pyserial to read the xml and beautifulsoup to retrieve information. The output was like this.</p>
  
  <pre><code>&lt;file&gt;&lt;property&gt;xx32&lt;/property&gt;&lt;/file&gt;
  </code></pre>
  
  <p>Now i am using qextserialport to read from the serial port and the xml i get is something like this.</p>
  
  <pre><code>&lt;
  fil
  e&gt;
  &lt;prope
  rty&gt;xx32
  &lt;/prop
  erty&gt;
  &lt;/
  file&gt;
  </code></pre>
  
  <p>My problem is that i cant parse an xml like this. I get errors.</p>
  
  <p>EDIT:</p>
  
  <hr>
  
  <p>Qextserialport reads data from the serial port in set of bytes that are not fixed.
  So how do i concatenate my xml into one string? I get an xml string every 4-5 seconds from the serial port.</p>
  
  <p>here is my code</p>
  
  <pre><code>this-&gt;port = new QextSerialPort(com_port,QextSerialPort::EventDriven);
  port-&gt;setBaudRate(BAUD57600);
  port-&gt;setFlowControl(FLOW_OFF);
  port-&gt;setParity(PAR_NONE);
  port-&gt;setDataBits(DATA_8);
  port-&gt;setStopBits(STOP_1);
  port-&gt;setTimeout(0);
  
  if (port-&gt;open(QIODevice::ReadOnly) == true)
  {
      //qDebug()&lt;&lt; "hello";
      connect(port,SIGNAL(readyRead()),this,SLOT(onReadyRead()));
  }
  </code></pre>
  
  <p>and the function that actually reads from the serial port</p>
  
  <pre><code>void CurrentCost::onReadyRead()
  {
      QByteArray bytes;
      bytes = port-&gt;readAll();
  
      //qDebug() &lt;&lt; "bytes read:" &lt;&lt; bytes.size();
      //qDebug() &lt;&lt; "bytes:" &lt;&lt; bytes;
      ui-&gt;textBrowser-&gt;append(bytes);
  
  }
  </code></pre>