Response contains invalid XML

I am using the DataService.query method for getting data 100 records at a time. On the third call I end up with the message “‘\u0019’, hexidecimal value 0x19, is an invalid character. Line 1, position 7248.” In my project the debugger is not letting me see what is being returned, just that. Any thought on what I could be doing wrong?

Hi Alex, it is more likely it is bad data in one of the records you are querying on. I have seen that before, but you will have to narrow down your search to find out what record it is failing on.

What table are you trying to query on?

0x19 is EOM, which is a valid Unicode character, but evidently your parser doesn’t like Unicode.

If your parser has an option to enable unicode support I would do so first, but if not I would run your call via curl or some other method that doesn’t try to parse the output and just write it to a file, then examine the results to find the offending record, then clear that field.

The table I am trying to query from is the Contact table. I will see if I can enable unicode characters and keep this post updated.

For a little context, I’m using C# and the Cook Computing library for interacting with the api.

My solution for finding the offending record is to systematically narrow down my query until I find the exact record (get 1000 at a time until error, then 100, and so on). I can then query just the id for this record and log that id to find my offending record, as well as any future offending records for any reason.