cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid XML Character (Unicode: 0x8)

alex_panganiban
Contributor

I’m using the XML Generator snap. I’ve already stripped out the usual suspect characters (&, <, >, ", ", %) but I am still getting the following error.

Writing document to error view with behavior: continue; reason=An invalid XML character (Unicode: 0x8) was found in the element content of the document.

I’m processing a VERY large file, so that preview function isn’t helping much. Does anyone have a suggestion on how I can locate and replace the offending unicode character?

2 REPLIES 2

robin
Former Employee

@alex.panganiban.guild, the unicode character 0x8 represents a backspace: - backspace (u+0008) copy and paste - Unicode® symbol

It shows up within XML Generator’s template editor like so (see the pink highlighted period-like character before “Tove”):

image

Assuming you have direct access to the XML, the easiest way to remove it is most likely an external text editor. For instance, I can find and replace all occurrences of this character using TextWrangler and regex search:

image

If you wish to stay within the product, the SnapLogic Expression Language’s replace() String function can be used (although note that the backspace character will be invisible in the UI components within Mapper etc.):

image

alex_panganiban
Contributor

thank you, i’ll try this out. appreciate the assist!