EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10151
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- To: David R Newman <drn@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: "Agung Prasetyo W." <prazetyo@gmail.com>
- Date: Wed, 18 Jun 2025 21:01:42 +0700
if I want to export as many as 10,000 files with the embedded option file, then where is the output location of the .xml file?
I tried using this command <EPRINTS_PATH>/bin/export archive_id archive XMLFiles 8076 8075
As for import, if I already have 10,000 .xml files for example repo-8076.xml, repo-8075.xml etc, how do I run your command?
<EPRINTS_PATH>/bin/import <ARCHIVE_ID> eprint XML eprints.xml --verbose
Hi Agung,
Whether you want to import one eprint or thousands you will need to use the <eprints> tags. This is because it needs to work for both the single and multiple case. If you had multple eprints without any eprints tags the XML would be invalid as there would be no root element. To save having to implement a different solution for single eprint import, this also requires the eprints tags to indicate a set of (in this case of 1) eprints is to be imported.
If you want to import thousands of records with file data, you may be better off doing this from the command line:
<EPRINTS_PATH>/bin/import <ARCHIVE_ID> eprint XML eprints.xml --verbose
Regards
David Newman
On 18/06/2025 09:33, Agung Prasetyo W. wrote:
CAUTION: This e-mail originated outside the University of Southampton.CAUTION: This e-mail originated outside the University of Southampton.Hi,
Maybe if it's only 1 item, it's okay to add the <eprint> and </eprint> tags. But if the data I want to export is tens of thousands, of course this is a waste of time.
RegardsAgung PW
On Wed, 18 Jun 2025 at 15:07, David R Newman <drn@ecs.soton.ac.uk> wrote:
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_ListHi Agung,
I have seen this when I have exported a single item and try to reimport but not sure how you got this with a full archive export. There is no <eprints> tag enclosing the set of <eprint> records. Usually you can just edit the file to add these <eprints> tags at the top (after the <?xml ... line) and then right at the end, so it looks like:
<?xml version='1.0' encoding='utf-8'?>
<eprints xmlns='http://eprints.org/ep2/data/2.0'>
<eprint id='https://eprints.example.org/1'>
...
</eprint>
<eprint id='https://eprints.example.org/2'>
....
</eprint>
</eprints>
Regards
David Newman
On 18/06/2025 08:39, Alan.Stiles [He/Him/They] wrote:
CAUTION: This e-mail originated outside the University of Southampton.CAUTION: This e-mail originated outside the University of Southampton.It looks like your file that you are trying to import isn’t correctly formatted, from the line
Unexpected tag: expected <eprints> found <eprint>
If you export just one file from your existing system it will give you an example file to compare against. I’m sure there’s an entry in the wiki for it but I can’t find it at the moment.
Alan
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List *** Archive: https://www.eprints.org/tech.php/ *** EPrints community wiki: https://wiki.eprints.org/
*** Archive: https://www.eprints.org/tech.php/
*** EPrints community wiki: https://wiki.eprints.org/
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List *** Archive: https://www.eprints.org/tech.php/ *** EPrints community wiki: https://wiki.eprints.org/
- Follow-Ups:
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- References:
- [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: "Agung Prasetyo W." <prazetyo@gmail.com>
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: "Agung Prasetyo W." <prazetyo@gmail.com>
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: "Alan.Stiles [He/Him/They]" <alan.stiles@open.ac.uk>
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: "Agung Prasetyo W." <prazetyo@gmail.com>
- Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- From: David R Newman <drn@ecs.soton.ac.uk>
- [EP-tech] Export and import xml file with embeded from old eprints to new version
- Prev by Date: Re: [EP-tech] coin DOI with Datacite
- Next by Date: Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- Previous by thread: Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- Next by thread: Re: [EP-tech] Export and import xml file with embeded from old eprints to new version
- Index(es):