commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Perez <>
Subject [JXPath] evaluating if a node exists
Date Mon, 20 Jun 2005 16:16:21 GMT

I'm trying to figure out how to "tell" if a given node, or expression,
exists or not, possibly using a boolean approach, but whatever I'm
trying, I'm facing a ClassCastException, and I don't understand why

Here the xpath expression I'm using (this one causing classcast) :

Boolean assisted =
= 1]/Action[@Type='AST_A']");

(I've also tried the getValue("expr", Boolean.class);, no luck)

In short, an <Action_Line> node having an <Action Type="AST_A"> child
may (or may not) be present before another <Action_Line> with a <Time
Type='A'> child, and I'm trying to evaluate this. Is there a correct
method to understand if a given expression returns "something" (I was
hoping the bool would return true or false, but it doesn't seem to) ?

Thanks for any support :)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message