I have a script that runs that imports a bunch of XML files. One of the elements it grabs frequently has special characters (for example, "ç"). When the import script processes this XML file, it errors out with the following message:
Error #-1072896760 An invalid character was found in text content.
Is there any way to catch this on the import? I know on the export I could manually replace "ç" with "c", but I don't want to do that for every character. I'd even be happy with catching them all on the export, though would prefer doing it on the import. The readelement function is attached. Any tips would be appreciated.
Public Function ReadElement(element)
on error resume next
Set objNodeList = xmlDoc.getElementsByTagName(element)
If objNodeList.length > 0 then
For each x in objNodeList
ReadElement = x.Text
ReadElement = ""
if Err.Number <> 0 then
errornumber = Err.Number
errormessage = Err.Description