XML Documents

DataNucleus supports persisting/retrieving objects to/from XML documents (using the datanucleus-xml plugin). It makes use of JAXB. If you wish to help out in this effort either by contributing or by sponsoring particular functionality please contact us via the DataNucleus Forum.

Datastore Connection

DataNucleus supports file-based XML storage currently.

The following persistence properties will connect to a local file on your local machine

datanucleus.ConnectionURL=xml:file:myfile.xml

replacing "myfile.xml" with your filename, which can be absolute or relative

So you create your PersistenceManagerFactory or EntityManagerFactory with these properties. Thereafter you have the full power of the JDO or JPA APIs at your disposal, for your XML datastore.



Queries

Access Platform allows you to query the objects in the datastore using the following

  • JDOQL - language based around the objects that are persisted and using Java-type syntax
  • JPQL - language based around the objects that are persisted and using SQL-like syntax


Known Limitations

The following are known limitations of the current implementation

  • Application identity is supported but can only have 1 PK field and must be a String. This is a limitation of JAXB
  • Persistent properties are not supported, only persistent fields