Illegal Characters in reportXML.xml cause Viewer error
Do you any scripts that can remove illegal characters either in the protege repository or from the reportXML.xml file? This would be a great help, as I constantly run into these issues and I have to manually remove these characters from the reportXMl file. Thanks.
- jonathan.carter
- Posts: 1087
- Joined: 04 Feb 2009, 15:44
Yes, we have recently written a script to run in the Script Console Tab that identifies and removes illegal XML characters from the repository in Protege.
I will post it to the share area and post back here once it is available
Jonathan
I will post it to the share area and post back here once it is available
Jonathan
Essential Project Team
- jonathan.carter
- Posts: 1087
- Joined: 04 Feb 2009, 15:44
I've just uploaded a copy of the script I use to identify and remove invalid XML characters from the repository in Protege.
Resolve Invalid Characters is a Jython script to be run in the Protege Script Console tab.
It runs in 2 modes:
Resolve Invalid Characters is a Jython script to be run in the Protege Script Console tab.
It runs in 2 modes:
- Find and remove all invalid characters
- Identify and report all invalid characters - which gives you the opportunity to resolve any invalid characters manually.
To use the script, just go to the Script Console tab in Protege and type:
Note, you need to use the Unix-style '/' directory separators as we're running in Java.Code: Select all
execfile("<FULL PATH TO YOUR COPY OF THE SCRIPT>/resolveInvalidXMLChars.py")
Once this has run, the script will print some further instructions for how to use it.
Example:Reports all instances with invalid characters in the reported slot.Code: Select all
execfile("C:/Downloads/resolveInvalidXMLChars.py") removeInvalidCharacters(False)
Hope this helps you out.
Jonathan
Essential Project Team