jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kiehl <christ...@sulu3000.de>
Subject Re: convert existing custom_nodetypes.xml to cnd
Date Tue, 03 Apr 2007 07:21:21 GMT
Stefan Kurla wrote:

> Is there any tool anywhere to convert custom_nodetypes.xml (which I
> have read is for internal purposes of jackrabbit only) to cnd format?

First: Why do you need to do this?

Second: Something like this should do the trick:

NodeTypeDef[] nodeTypeDefs = NodeTypeReader.read(new FileInputStream("foo/bar"));
NamespaceResolver resolver = (NamespaceResolver) 
session.getWorkspace().getNamespaceRegistry();
StringWriter writer = new StringWriter();
CompactNodeTypeDefWriter.write(Arrays.asList(nodeTypeDefs), resolver, writer);
System.out.println(writer.toString());

Cheers
Christoph


Mime
View raw message