org.xml.sax.SAXParseException

Started by NeilKemp, February 15, 2023, 13:51:44 PM

Previous topic - Next topic

NeilKemp

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?

Phil Beauvoir

#1
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
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

rchevallier

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)

NeilKemp

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

NeilKemp

@Phil Beauvoir
I have attached a test file if that will help

Phil Beauvoir

#5
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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

NeilKemp

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

Phil Beauvoir

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?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.