XML SCRIPT EDITOR

Job ID: 35266317

Budget: €12 – €18 EUR

I need some help with a Groovy script that I am trying to modify. The script takes in a Boolean parameter and is supposed to generate an XML file based on the value of the Boolean parameter.
The script is working fine if the Boolean parameter is set to false. However, if the Boolean parameter is set to true, the script throws an error.

Here is the script:
<code>def generateXML(boolean b) {

def xml = '''&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--