REST API Explorer - PCDATA invalid Char Value Error

John Longhitano
Kilo Guru

When I pull a set of records using the REST API Explorer everything works great until I add the short description field to be pulled.

I get the below error

This page contains the following errors:

error on line 592 at column 27655:

PCDATA invalid Char value 11 Below is a rendering of the page up to the first error.

 

Is it possible that there are invalid characters in the short description of the record(s) that cause the XML to error?

Has anyone seen this before?

 

I'm pulling about 10k records on the Change Task table and the pull works fine without the short description.

 

Thanks,

John

5 REPLIES 5

Hitoshi Ozawa
Giga Sage
Giga Sage

The error message suggests the is an invalid character in the xml document. It's necessary to find the character and replace it.

Another thing to try is retrieving the message in json format to see if that'll work.

 

What would count as an invalid character?  I've searched for '&', '<', '>' and tried to eliminate any records that contain these characters in the short description.  How would one find what's causing this in a list of 10000 records?

It may be control characters.

>error on line 592 at column 27655:

That's where the error is. To be sure, try to check if there are any non-alphanumeric characters in the data.

Is the data coming from ServiceNow or from other service?

Its coming from ServiceNow.  The issue with checking that line is the data stops rendering because of the error so I have no clue what line 592 is.