You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Simon Heinrich <si...@c24solutions.com> on 2001/11/06 13:01:37 UTC

Using XPath to parse a string

I am trying to use the XPath classes to parse a string and then get access
to its constituent parts.
Example: given the string:
'/doc/name/@wholename=concat(/doc/name/@firstname,/doc/name/@lastname)'
I want to be able to identify the fact that it is constructed from an '='
operation and a 'concat' function. I can create an XPath object from the
string, get the Expression from that and cast it to the appropriate type
(org.apache.xpath.operations.Equals). However the left and right arguments
to the operation are protected members and their are no getters for them so
I can delve no deeper into the expression.

Am I missing something?
Does anyone know of a better way of doing this?
Why should we have restricted access to these members?


Cheers,
Simon Heinrich
[Senior Software Developer]

Century 24 Solutions
www.c24solutions.com