Author Topic: Not able to import xml interchange file  (Read 5420 times)

kumarasivan

  • Newbie
  • *
  • Posts: 2
Not able to import xml interchange file
« on: January 23, 2017, 15:41:30 PM »
Getting this error when importing xml interchange file generated externally
package with uri http://www.opengroup.org/xsd/archimate not found.

I tried to export an existing model as interchange file  and tried to import the same file back into Archi and still got this error.

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Not able to import xml interchange file
« Reply #1 on: January 23, 2017, 15:42:45 PM »
How did you import it? Did you use the import menu item?
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

kumarasivan

  • Newbie
  • *
  • Posts: 2
Re: Not able to import xml interchange file
« Reply #2 on: January 23, 2017, 20:08:34 PM »
I used the import menu item.

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Not able to import xml interchange file
« Reply #3 on: January 23, 2017, 20:24:30 PM »
The error message that you're seeing would occur if you attempt to open an exchange format file from the "Open" menu rather than the "Import" menu item. Are you sure about this?
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: Not able to import xml interchange file
« Reply #4 on: January 25, 2017, 10:45:46 AM »
I also got an error (using the import XML interchange option, using a XML interchange file exported with Archi from an existing model) but I also get an error when I export an existing model to csv and import it back. In the exported csv files I notice some strange indexes like "28aba5ee;e9da068b;1.6" or "=""0d13726c;e9da068b;1.6""" which seems to stop the import. The error is Invalid character found in ID: "28aba5ee;e9da068b;1.6" which is the first line with an element definition in de NonLife-elements.csv. The first three lines in that file are:

"ID";"Type";"Name";"Documentation"
"e9da068b;1.6";"ArchimateModel";"NonLife";""
"28aba5ee;e9da068b;1.6";"Capability";"Capability";""


BTW I can't share the full csv or archimate because it contains confidential information

Regards,
Peter

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: Not able to import xml interchange file
« Reply #5 on: January 25, 2017, 10:54:17 AM »
I think the problem that the index e9da068b;1.6 from the first line "e9da068b;1.6";"ArchimateModel";"NonLife";"" with the model definition is added to every index in the following lines in the csv file.

Regards,
Peter


Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Not able to import xml interchange file
« Reply #6 on: January 25, 2017, 11:17:23 AM »
Hi, the problem is using the ";" character in IDs.  IDs generated by Archi don't have these, so these must have been created elsewhere.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: Not able to import xml interchange file
« Reply #7 on: January 25, 2017, 11:29:44 AM »
I only use Archi for importing/exporting my models, mainly the GRAFICO plugin. For this element the GRAFICO XML info is:

<archimate:Capability
    xmlns:archimate="http://www.archimatetool.com/archimate"
    name="Capability"
    id="28aba5ee;e9da068b;1.6"/>

Strangely enough I can still import the GRAFICO model which contains this kind of invalid indexes. I guess the bad news is that I'm now working with a model with invalid indexes  :(

Regards,
Peter

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Not able to import xml interchange file
« Reply #8 on: January 25, 2017, 11:33:18 AM »
So now I don't understand what generated the ID here.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: Not able to import xml interchange file
« Reply #9 on: January 25, 2017, 11:36:38 AM »
BTW I've also used the database plugin in the beginning before I started to use the GRAFICO plugin so perhaps that plugin caused the strange indexes.

I will need to think of a way to start with a whole new model with rebuild valid indexes.

Regards,
Peter

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: Not able to import xml interchange file
« Reply #10 on: January 25, 2017, 19:21:08 PM »
I created a new model by producing .csv files with empty indexes and imported them into an emty model. But when I export the model with the newly created indexes to .csv I see again some strange indexes like "=""0f598651-017f-4de9-915c-6f9fa2057875"""
This was with the Strip newline and Excel workaround options checked during the export, and I selected to UTF8.
I could import these .csv files back into an empty model.

With the Strip newline and Excel workaround options unchecked the indexes seems to be alright with indexes like "0f598651-017f-4de9-915c-6f9fa2057875". I could import these files back into an empty model.

Regards,
Peter

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 647
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: Not able to import xml interchange file
« Reply #11 on: January 25, 2017, 20:17:22 PM »
Hi Peter,

I confirm that your first "bad" ids have been created by the DB plugin (I don't know exactly how, but I remember that Hervé explained that his DB plugin internally uses a concatenation of model ID, Element ID and version).

The latest ID (0f598651-017f-4de9-915c-6f9fa2057875) is ok, this is the new (long) universally uniq ID generated by Archi since beta 4 (or 5, donc rememer exactly).

Regards,

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: Not able to import xml interchange file
« Reply #12 on: January 25, 2017, 20:51:44 PM »
Hi Jean-Baptiste,

But my latest test were done with totally new created id's within Beta 5, so I think the problem with id's like "=""0f598651-017f-4de9-915c-6f9fa2057875""" was caused by using the checked options "Strip newline and Excel workaround" during the export to cvs. I'm working on Windows 7, not sure if the behaviour is different on Linux.

Anyway, I got it working again, just lost all my relations in the whole process but I wanted to start with a clean model anyway  :)

BTW I just exported all my model elements to a TiddlyWiki, see if I can combine a TiddlyWiki with Archi HTML output...

Regards,
Peter

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: Not able to import xml interchange file
« Reply #13 on: January 25, 2017, 21:19:40 PM »
The Excel workaround is just that - a workaround for Excel. It's not meant to be used for anything else other than getting the data into Excel, certainly not for round tripping.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 647
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: Not able to import xml interchange file
« Reply #14 on: January 25, 2017, 21:37:39 PM »
The Excel workaround is just that - a workaround for Excel. It's not meant to be used for anything else other than getting the data into Excel, certainly not for round tripping.

Yes, I think we should better explain it because people often don't understand...

In Excel (and most other spreadsheet), some magic usually happen when opening a CSV file. The most common is that if a cell content starts with one or more zero and looks like a number, then it is imported as a number, which means that those leading zero are lost. This is an obvisous issue when those cells are in fact IDs.

The workaround included in Archi makes those cells exported using the ="value" pattern. This is then understood by spreadsheet as a string value, whatever the content. But this workaround has a drawback: a CSV generated this way can't be used for import without been opened in a spreasheet and saved back in CSV. This is mandatory because it's only when saving back to CSV that the leading "=" will be removed, making it usable again in Archi.

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate