jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Esnault <f...@legisway.com>
Subject RE: Importing and Exporting XML
Date Wed, 13 Jun 2007 07:18:51 GMT
I confirm, the document view is not recommended for two reasons :
- some metadata are added during import (at least jcr:primaryType, see spec.;
- multivalued properties are not exported !

Use system view... ;)

Frédéric Esnault - Ingénieur R&D
60 boulevard de la mission Marchand
92400 Courbevoie La Défense
-----Message d'origine-----
De : Shaun Barriball [mailto:sbarriba@yahoo.co.uk] 
Envoyé : mardi 12 juin 2007 19:36
À : users@jackrabbit.apache.org
Objet : RE: Importing and Exporting XML

When round-tripping JCR data within XML like this I think the recommendation
is to use exportSysView rather than exportDocumentView.
Hope this helps,

-----Original Message-----
From: woolly [mailto:p.barr@lbs-ltd.com] 
Sent: 12 June 2007 18:05
To: users@jackrabbit.apache.org
Subject: Importing and Exporting XML

Hi all,

Is it possible to import xml into a node, and then export that xml back out
to have the same xml-equivalent file? At the moment I'm trying:

fis = new FileInputStream(inputFile);
session.importXML(node.getPath(), fis,

// followed by....
out = new FileOutputStream(outputFile);
session.exportDocumentView(node.getPath(), out, true, false);

The difference between inputFile and outputFile seems to be that there are
some additional jcr specific attributes. Is this necessary?

What I'm really trying to do is manage an xml document (eventually many xml
documents), allow people to make changes to only certain parts of it,
versioning those parts and using other JackRabbit features. Is this the kind
of thing that JackRabbit was intended for? Or should I just load the xml
document in as a property of a node and deal with the other things myself?

Thanks for any help,


Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message