XML Export Format

From EPrints Documentation
Revision as of 18:08, 10 January 2007 by WikiSysop (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects

Any Data Object may be expressed as XML. The XML schema is specific to the repository as the fields, and extact meaning of the fields vary from repository to repository (although will be quite similar).

The XML format can be used to both export data from the repository and import it in.

Multiple Fields

Compound Fields

<related_url>
  <item>
    <url>http://www.publisher.com/url>
    <type>pub</type>    
  </item>
  <item>
    <url>http://www.author.com</url>
    <type>author</type>
  </item>
</related_url>

Name Fields

<name>
  <honourific>Dr</honourific>
  <family>Notley</family>
  <given>A.</given>
  <lineage>III</lineage>
  <id>person@people.com</id>
</name>

Documents

<document xmlns="http://eprints.org/ep2/data/2.0">
  <docid>5</docid>
  <rev_number>1</rev_number>
  <eprintid>5</eprintid>
  <pos>1</pos>
  <format>application/pdf</format>
  <language>en</language>
  <security>public</security>
  <main>paper.pdf</main>
  <files>
    <file>
      <filename>paper.pdf</filename>
      <filesize>12174</filesize>
      <url>http://demoprints3.eprints.org/5/1/paper.pdf</url>
    </file>
  </files>
</document>

Files

<file>
  <filename>paper.pdf</filename>
  <filesize>12174</filesize>
  <url>http://demoprints3.eprints.org/5/1/paper.pdf</url>
</file>


Examples

EPrint

(not including base-64 encoded file)

<?xml version="1.0" encoding="utf-8" ?>
<eprints>
 <eprint xmlns="http://eprints.org/ep2/data/2.0">
   <eprintid>1</eprintid>
   <rev_number>3</rev_number>
   <eprint_status>archive</eprint_status>
   <userid>1</userid>
   <dir>disk0/00/00/00/01</dir>
   <datestamp>2006-12-13 18:00:06</datestamp>
   <lastmod>2006-12-13 18:00:07</lastmod>
   <status_changed>2006-12-13 18:00:06</status_changed>
   <type>conference_item</type>
   <metadata_visibility>show</metadata_visibility>
   <creators>
     <item>
       <name>
         <family>Lericolais</family>
         <given>Y.</given>
       </name>
       <id></id>
     </item>
   </creators>
   <title>African Elephants and Man</title>
   <ispublished>pub</ispublished>
   <subjects>
     <item>GR</item>
     <item>QR</item>
     <item>BX</item>
     <item>PN2000</item>
   </subjects>
   <full_text_status>public</full_text_status>
   <pres_type>paper</pres_type>
   <abstract>This is where the abstract of this record would appear. This is only demonstration data.</abstract>
   <date>1998</date>
   <event_title>4th Conference on Animal Things</event_title>
   <event_location>Dallas, Texas</event_location>
   <event_dates>1-9 June</event_dates>
   <documents>
     <document xmlns="http://eprints.org/ep2/data/2.0">
       <docid>1</docid>
       <rev_number>1</rev_number>
       <eprintid>1</eprintid>
       <pos>1</pos>
       <format>application/pdf</format>
       <language>en</language>
       <security>public</security>
       <main>paper.pdf</main>
       <files>
         <file>
           <filename>paper.pdf</filename>
           <filesize>12174</filesize>
           <url>http://demoprints3.eprints.org/1/1/paper.pdf</url>
         </file>
       </files>
     </document>
   </documents>
 </eprint>
</eprints>