removed syntaxerror from payloadToXML()