AnsweredAssumed Answered

Getting error when using "add cached data" on a map with special character in the index

Question asked by lyau on Mar 15, 2017
Latest reply on Mar 16, 2017 by Lee Sobotkin

I am trying to load a bunch of documents into Salesforce. I have folder full of PDF files and a single CSV file with the file names and the associated metadata (related account, date, etc).


I am reading the CSV file, splitting it, and putting into a document cache. I am then pulling in all the PDF files and adding the document cache to the map before I load it into Salesforce. This all works great except when the file name contains a special character like "&". In this case I get this error:

Unable to create XML files from data, the document may not be well-formed xml ; Caused by: Unexpected character ' ' (code 32) (missing name?)
at [row,col {unknown-source}]: [1,36]


I have tried encoding all the documents in UTF-8 format and that doesn't seem to help. Any help would be appreciated