commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Lansing <>
Subject [JXPATH] @name feature
Date Thu, 07 Aug 2003 20:17:37 GMT

The @name feature for accessing Map entries has a problem. This works 
fine for the simple names used in the example, such as 
getValue("addresses[@name='home']/zipCode"), and there is even a note 
that says: "Note: At this point JXPath only supports Maps that use 
strings for keys."

The problem is that a HashMap key can be any String, including one that 
contains the character ':'. But the @name feature tries to turn this 
string into the local part of a QName, and if there is a ':', the QName 
constructor throws an exception.

So this feature doesn't work when keys are URL's, which is actually a 
very common thing to do.



View raw message