Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

ImportData Error Trapping

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Level 2

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.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

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.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now