I have a xml file that holds metadata properties info of an listitem in a library. The metadata properties holds some invalid hexadecimal characters. I use the below code to read the xml file, it throws invalid hexadecimal characters xml exception.
CharacterSettings - checkcharacter doesnt seem to work. can anyone help me on how to handle this exception to remove those invalid xml values:
SpFile ItemAuditFile = ListItem.File
;\\xml file with info on properties