ImportData Error Trapping

Avatar

Avatar

grantefuller

Avatar

grantefuller

grantefuller

16-04-2018

I have designed a form where an externally created XML file is imported into the form via xfa.host.importData(); This typically works great except when there are certain special characters in the XML fields (&, accent symbols, etc.). In this case, the form just goes blank. I've been able to replace most of the special characters in the XML files, but there are still some that I haven't been able to chase down. Is there a way to do error trapping on this to be able to know where the problem is in the XML file?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

grantefuller

Avatar

grantefuller

grantefuller

18-04-2018

Thank you for the reply. The issue isn't the syntax of the xml file. That is fine. What was happening is that characters such as accent symbols (grave and acute instead of single quote) were in the source text for the field itself. I was able to resolve this by replacing many of the characters before they were added to the XML file and using a different type of encoding - ISO-8859-1, instead of UTF-8.

Answers (1)

Answers (1)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

18-04-2018

You can use an XML validator to check your XML file. XML Validator