There is an error in XML document --> System.Xml.XmlException: '', hexadecimal value 0x02, is an


 Product(s):APM Implementation and Performance Management
 Version(s):7.18.32.18
 Environment:N/A
 Area:N/A
 Subarea:N/A

Problem Description

Application throwing below error while Exporting and Searching inspection reports.

Error   Ivara.PL.Client.ServerCallRequest [18] System.InvalidOperationException: There is an error in XML document (3, 103). ---> System.Xml.XmlException: '', hexadecimal value 0x02, is an invalid character. Line 3, position 103.

Solution

There is an invalid Unicode character "&#x2" in reports. Issue likely originates from Copy/cut and paste from Word or other rich text format which utilizes and supports such invisible characters, mostly older, low number hexadecimal values. To solve issue, Open Thick Client without admin role, Edit/redraft reports and remove hexadecimal value from reports and save.

Steps to find invalid character:

1. Copy error log from log file and paste it in Notepad++
2. Check for highlighted ISO name or Unicode character. in this case, see below screenshot - STX is an ISO name.

3. you need to search unicode character with Latin block. in this case STX is hidden unicode character in log.
4. Export report to Excel in thick client, copy HTML Text column (LingString Datatype) like Inspection Analysis, Inspection Summary, Recommendations in Notepad++ and find invalid characters as per logged error.


You can avoid these types of error by removing invalid character before adding data in application.

1. You can manually enter data (Without Copy, Paste) in HTML Text column (LongString Datatype) like Inspection Analysis, Inspection Summary, Recommendations
2. If you want to copy data from Word or other rich text format which utilizes and supports such invisible characters, then first paste that data in Notepad, check any invalid character and remove it. now copy data from Notepad and paste it in application.

Should this not resolve the issue please report the issue as a case to APM Technical Support.

See also

Link to check unicode character - https://unicodeplus.com/U+0002