jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@day.com>
Subject Re: Namespaces in Jackrabbit
Date Tue, 18 Mar 2008 09:04:57 GMT
Hi,

On Tue, Mar 18, 2008 at 12:33 AM, Karianne Berg <keibi@start.no> wrote:
>  My application uses XML as a data format internally, and some of this XML
>  has namespaces. In the XML library I use (JDOM), I can get an element's
>  namespace by calling the getNamespace() method on the element. Is there any
>  way to do this on a JCR node, or do I have to extract it from the node name
>  by using substring operations? The latter seems a bit unnecessary , but I
>  haven't found any method that does this for me on the Node interface. Can
>  anyone enlighten me on this subject?

Yes, you'll need to take the prefix and use
session.getNamespaceURI("prefix") to get the namespace URI.

BR,

Jukka Zitting

Mime
View raw message