Archi Forum

Archi => General Archi Discussion => Topic started by: NeilKemp on February 15, 2023, 13:51:44 PM

Title: org.xml.sax.SAXParseException
Post by: NeilKemp on February 15, 2023, 13:51:44 PM
When attempting to import an XML file from another tool, I get the error message...LineNumber34; ColumnNumber 36; An Invalid XML character (Unicode 0x5) was found in the element content of the document

Is there any way to identify, delete or prevent these characters in the XML file or the source?
Title: Re: org.xml.sax.SAXParseException
Post by: Phil Beauvoir on February 15, 2023, 14:11:45 PM
Hi, without knowing what the XML file is or where it came from, how you are importing the file, or any other clue it's hard to say. Can you give more details?

Phil
Title: Re: org.xml.sax.SAXParseException
Post by: rchevallier on February 16, 2023, 14:44:23 PM
Once I got this kind of error when I had an ascii control char (code below 32) in a text. These chars are not supported in XML 1.0 (except \n\r\t)
Title: Re: org.xml.sax.SAXParseException
Post by: NeilKemp on February 16, 2023, 23:35:08 PM
I suspected that it is an invalid ASCII character. The message is very vague

When I use a text editor I see a tiny box shape at the location of the error message, but have no idea what it is, or if or how to get rid of them

I cannot do this by hand. I want to move a model from another tool
Title: Re: org.xml.sax.SAXParseException
Post by: NeilKemp on February 16, 2023, 23:37:02 PM
@Phil Beauvoir
I have attached a test file if that will help
Title: Re: org.xml.sax.SAXParseException
Post by: Phil Beauvoir on February 17, 2023, 09:16:47 AM
The file is an ArchiMate Exchange Format file that seems to have gone through Archi at some point, judging by the format of IDs. If you open it in a text editor you can see that there are some illegal characters in the documentation tags. For example:

<documentation xml:lang="en">␅FON    1    biuS9C0FSegoe UI␆The ability to create the strategies that identify the means and ways used by IT to deliver on its goals␅FON    1␆</documentation>
Neil, did this come from another tool or process? Looks like something inserted some garbled font information.

To fix this either figure out what went wrong when it was exported/imported from the other tool/process, or manually edit the file in a text editor and do a find and replace on the illegal characters and garbage strings.
Title: Re: org.xml.sax.SAXParseException
Post by: NeilKemp on February 17, 2023, 12:55:03 PM
It was never in Archi. I came from a tool that claims to be ArchiMate compliant but is not. There are many issues with this tool, and I hoped to put the model in Archi to clean things up.  It's been a very long time since I did the type of work that looks like it needs to be done, but thank you for eliminating some of the possibilities - at least I know what I am faced with. Any recommendations for tools I could use to clean this mess up?
Thx for your assistance
Title: Re: org.xml.sax.SAXParseException
Post by: Phil Beauvoir on February 17, 2023, 13:05:22 PM
Quote from: NeilKemp on February 17, 2023, 12:55:03 PMIt was never in Archi. I came from a tool that claims to be ArchiMate compliant but is not. There are many issues with this tool, and I hoped to put the model in Archi to clean things up.  It's been a very long time since I did the type of work that looks like it needs to be done, but thank you for eliminating some of the possibilities - at least I know what I am faced with. Any recommendations for tools I could use to clean this mess up?
Thx for your assistance

> It came from a tool that claims to be ArchiMate compliant but is not

Seems to be quite common. ;-) I'd be interested to know what that tool is.

For cleaning up, the only thing I can suggest is opening it in something like VS Code and manually deleting the garbage strings. Unless anyone else knows a better way?