Export xml with fields "alternativeIdentifiers" and "alternativeIdentifierLabels"

42 views
Skip to first unread message

Rute Mira

unread,
Jul 27, 2022, 11:53:56 AMJul 27
to AtoM Users
Hi,

I did a csv import with the fields "alternativeIdentifiers" and "alternativeIdentifierLabels" correctly. 

When I try to export the xml by command line like this: 
php symfony export:bulk --single-slug="slug" /home/unipartner/name.xml

The following appears on the command line:: 
"PHP Warning: DOMDocument::loadXML(): Unescaped '<' not allowed in attributes values ​​in Entity, line: 386 in /usr/share/nginx/atom/lib/Qubit.class.php on line 330 
PHP Warning: DOMDocument::loadXML(): attributes construct error in Entity, line: 386 in /usr/share/nginx/atom/lib/Qubit.class.php on line 330 
PHP Warning: DOMDocument::loadXML(): Couldn't find end of Start Tag unitid line 386 in Entity, line: 386 in /usr/share/nginx/atom/lib/Qubit.class.php on line 330 
PHP Warning: DOMDocument::loadXML(): Opening and ending tag mismatch: did line 370 and unitid in Entity, line: 386 in /usr/share/nginx/atom/lib/Qubit.class.php on line 330" 

 The generated xml only contains the line: 
<?xml version="1.0"?> 

All information is missing with your descendants. 

If I delete the CSV values ​​of the  "alternativeIdentifiers" and "alternativeIdentifierLabels" columns, the export goes without a problem. But we do not intend to erase these values. 

Has anyone gone through this? How did you solve it? 

Thanks.

Rute Mira

unread,
Jul 27, 2022, 12:10:28 PMJul 27
to AtoM Users
I have version 2.4.1 - 156. Thanks

Dan Gillean

unread,
Jul 28, 2022, 8:42:24 AMJul 28
to ICA-AtoM Users
Hi Rute, 

I have a few questions to help us try to narrow down the source of the problem. 

First, about your system:
  • Did you follow the recommended 2.4 installation instructions? If you've made changes (e.g. different operating system, php version, database, etc), please tell me more about those changes
  • Does your site have any local customizations in place, such as custom development or a theme plugin?
About the CSV:
  • Are you using Microsoft Excel to prepare your CSV? Excel uses different line ending characters and encoding by default (AtoM expects unix style line endings and UTF-8 encoding - see here in the docs), which can sometimes cause import issues. We recommend LibreOffice Calc as a free open source alternative, which gives you more control over the encoding and uses the correct line endings by default. 
  • Are you including the < character in the alternative identifier fields in your CSV? This is a reserved character in XML that will cause exports to break
On the alternative identifier fields: 
  • Are you able to create a record in the user interface with the alternative identifiers populated, and export it as XML successfully?
Hopefully with more information we can provide further suggestions. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/41ce6f60-98e7-42d0-8d54-bcaede9d6270n%40googlegroups.com.

Rute Mira

unread,
Aug 1, 2022, 7:12:44 AMAug 1
to AtoM Users
Hello, 

 Our environment was installed with installation instructions. We use the plugins that come with AtoM. We create a multi-instance export script (we export xml) to import into a single instance (in different IP ranges). The user imports with CSV in each instance, there is a cronjob that exports the xml from public records and imports it in the final instance.

I was using Excel CSV utf8. I already tried with LibreOffice and the behavior is the same, it only exports a line and it is not possible to import the xml in the final instance. In the data we don't have the characters <. 

Yes, manually it is possible to create and export the xml correctly. Just as, if we import an xml, open the registry and save (without any changes) it is possible to export correctly. But we have several descendants and there would be a lot of records to open and save without making changes. If we import and export soon, it gives the error. 

Any idea how we could get around this situation? 

Thanks.

Alhaji Alpha Kamara

unread,
Aug 1, 2022, 4:37:32 PMAug 1
to ica-ato...@googlegroups.com
Hey mira for import or export of records some times it is the service provider.I was faced with the same problem to import digital records into Atom software final destination.I am using the php version and there is a local Customization identity area which is control by an admin and we only serve as contributors.
You are advised to always used Adobe Acrobat pro to edit, manage and re-arrange your files and folder after which you can be able import files into the Atom software by:
Using the Adobe  Acrobat pro
Create 
Combine file in one 
Add file you want to combine 
Select all the file 
post it on Archival materials 
To add digital objects:
Click menu
Click link digital documents 
Click create

Dan Gillean

unread,
Aug 2, 2022, 8:22:44 AMAug 2
to ICA-AtoM Users
Hi Rute, 

Yes, manually it is possible to create and export the xml correctly.

This suggests to me that the problem is with the transformation then - either something in your import CSV, or else something about the scripts you are using to coordinate the exports. If you can manually create a description with the alternative identifier fields populated and export those successfully, then I don't think the problem is with AtoM's code. 

I would suggest you start your investigations there - in particular, I would suggest examining the outputs of the cronjob. The original error was about an unexpected character ( < ) that is not allowed in XML. It may be that the cronjob is not using UTF-8, or is introducing unexpected characters - without examining everything and all steps it's hard to say. 

I would suggest that you try to identify further ways to isolate where the problem originates - for example, can you manually run the export:bulk task on an AtoM instance that includes your CSV-imported records? Can you then manually import the resulting EAD XML? Keep going until you can identify exactly where the problem is introduced. 

Good luck! 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages