abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: XPath namespace prefixes
Date Thu, 21 Sep 2006 01:01:28 GMT
This should work

  Map<String,String> ns = xpath.getDefaultNamespaces();
  ns.put("f","urn:foo");
  String s = xpath.valueOf("...", element, ns);

- james


Hugo Duncan wrote:
> I had a look through the archives and couldn't see any discussion on this,  
> so apologies if I missed it.  At some point since 0.1.0 the XPath  
> setDefaultNamespaces(Map<String,String> namespaces) method was removed,  
> and I don't see any way of constructing an XPath instance with an  
> additional namespace prefix (except by subclassing FOMXPath).  Is there  
> some way of adding a namespace prefix that I have missed, or a rationale  
> for not being able to do so?
> 
> Hugo
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 

Mime
View raw message