Skip to content

XPathSyntaxException using OR #86

olmorigolo opened this Issue Jun 13, 2012 · 1 comment

2 participants


XPathExpression xp = xpfac.compile("//*[text()='?' OR text()='']", Filters.element(), null, namespaces);

throws this exception:
org.jaxen.XPathSyntaxException: Expected: ]

I'm not sure if this syntax is allowed. It just works in firepath.

rolfl commented Jun 13, 2012

Hi Olmo.

Couple of things. Firstly, this is a Jaxen issue ;-)

Secondly, Jaxen (and I believe XPath in general) is case sensitive to the 'or' expression. For your XPath to work you need to change the case of 'OR' to 'or'. 'or' is an operator.


@rolfl rolfl closed this Jun 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.