CA Identity Manager: An invalid XML character (Unicode: 0x1f) was found in the element content of the document

Document ID : KB000099214
Last Modified Date : 01/06/2018
Show Technical Document Details
Question:
Attempting import an environment zip file, you are getting the below error: 

Error: An invalid XML character (Unicode: 0x1f) was found in the element content of the document.

You might have also ran the environment xml through an xml formatter and found nothing wrong with it. However you repeatedly get the error. You might have also used the exact same XML in the past without issue.

You have also read documentation found here:

https://docops.ca.com/ca-identity-manager/14-0/EN/configuring/ca-single-sign-on-integration/integrate-ca-sso-with-ca-identity-manager/update-and-import-environment-definitions
Answer:
Unicode: 0x1F is the Unit Separator character. 

0x1F is decimal 31, so find in range from 31-31 and simply remove the two rogue characters. 

Using Notepad++, one can locate those and remove. 

STEPS:

1) Open the XML file in Notepad++ 

2) Enable "Show All Characters" (i.e. View->Show Symbols->Show All Characters) 

3) Use 'Find Characters in range' feature. (i.e. Search->Find Characters in range). This shold be the last option once you click on 'Search' menu bar option. 

4) In the dialog box, pick 'My Range' and in both column define 31 - 31 

5) Search for all those USUS characters which is the root cause, delete them, save the file and attempt to import.