21 Jun
2002
21 Jun
'02
9:15 p.m.
I have a python script that transforms the results of a zsql method into xml. The script builds the xml in a python string and returns that string as the scripts output. The problem I have is that the string contains a newline character (\n) which corrupts the xml. I made sure to strip the string before it's returned...
XML = XML.strip() return XML
... but the output always contains the newline character. Does anyone have suggestions on how I could fix this?
XML = XML.replace('\n','') is likely to do the job by removing all newlines.