Thanks
On 4/3/07, Christoph Kiehl <[EMAIL PROTECTED]> wrote:
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


Reply via email to