jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karianne Berg <ke...@start.no>
Subject RE: Namespaces in Jackrabbit
Date Tue, 18 Mar 2008 09:37:42 GMT
Thank you for a swift answer, this was exactly what I was looking for!

Best regards,
Karianne Berg

-----Original Message-----
From: jzitting@day.com [mailto:jzitting@day.com] On Behalf Of Jukka Zitting
Sent: 18. mars 2008 10:05
To: users@jackrabbit.apache.org
Subject: Re: Namespaces in Jackrabbit


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.


Jukka Zitting

View raw message