That might help, thank you! But in general, how can you escape double quotes in a string in Brightscript?
BTW, BrightScriptReferenceManual.pdf says:
GenXML(gen_header As String) As String but passing a string to the function throws an error! It turns out the parameter has to be Boolean!