commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pike, Gordon" <>
Subject JXPATH - How to search for an attribute value that has a ":" in it?
Date Thu, 06 Nov 2008 16:52:46 GMT
I have been trying to select objects with an attribute @beanIdentity
that has a colon in it. I've tried escaping the colon but that doesn't
work either. When I use another field (like the commented out createdBy
field) I get results. Is there a way to search with string that has a
":" in it? I've tried escaping the colon but that didn't work either.
JXPathContext context = JXPathContext.newContext(container);

//String xpath = "ipcList[@createdBy = 'KUCZUN, LAURIE ']";

String xpath = "ipcList[@beanIdentity =

//String xpath = "ipcList[@beanIdentity =

Iterator i = context.iterate(xpath);

while(i.hasNext()) {

IpcV ipc = (IpcV);

log.debug("Ipc " + ipc.getBeanIdentity());



Gordon Pike

Tech Lead, Horizon Expert Plan

McKesson Provider Technologies 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message