This appears to be an issue with your recordset data. Perhaps you have a column named "XML" and it is complaining that you can't have a tag with that name in the middle of your document.
I could debug this for you and get it working, but since the issue is with a hand coded and not supported section of your code I'd have to bill you for an hour of premier support in order to fix it ($100).
If you are interested you can just reply to this thread with FTP information and a URL to view the current page and I'll get it working.