After reading Valencia's comment and the "wrong" output again and think about it, I figured out what's wrong. So the "wrong" output is just an error message in HTML format, where i print every tag. The message itself says:
This page contains the following errors:
error on line 1 at column 14: String not started expectin ' or "
The beginning should look like this
<?xml version="1.0" encoding="UTF-8"?>
but when creating the QR-Code backslashes are added
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
The first backslash is at column 14.
When I create a static XML string I insert backslashes to mask the ' " ', so my declaration and the XML code from the QR-Code look equal. But they aren't, cause the static XML string does not contain the backslashes. And these backslashes cause the error while parsing.
The easiest solution is to just not put the XML information in the QR-Code. So directly starting with the first node.
Thanks for your help.