diff --git a/src/SaxParser.cpp b/src/SaxParser.cpp
index 09514ffe796110981ed5a7e1e2857e630f88c468..cd0f3acda1053380f90a3a39a10b45812ddd02ee 100644
--- a/src/SaxParser.cpp
+++ b/src/SaxParser.cpp
@@ -1357,7 +1357,8 @@ bool SaxParser::ParseTxtFormat(const QString &fileName, SyncData* dataset, doubl
                     }
                     continue;
                }
-
+               line = line.trimmed(); // remove whitespaces from
+                                      // beginning and end
                QStringList pieces = line.split(QRegExp("\\s+"));
 
                double pos[3];