That malformed xml response is being returned by your server. You don't "clear it" in your Roku.
Okay, I got it working successfully once by changing the folder name from /Roku to /Test. The code you gave me now works to clear it beautifully.
The problem I am still having is that once it gets the code it won't get another code because something is caching the result. I deleted the app from the Roku, changed the folder from Test to Test3 and it still pulls the same regcode. Here is the debugger output that shows even though the server has the regCode as 99994 it pulled abcd.
------ Running ------
showHomeScreen | msg = | index = 0
Enter registration code abcd at http://www.303north.com/Test3 for 13C2CU068971
checking registration status
retry duration 0 at 30 sec intervals for 900 secs max
Wait for 30