Do not add extra caracters on parameter value

Now there are no extra characters added for a value between pair
of tags. The previous commit added newlines with the purpose of
increasing readability. But correcteness is more important than
readability.

Also the error reporting has been improved.

Signed-off-by: Marius Avram <marius.avram1309@gmail.com>