> My question is if I didn'tt know ahead of time the > prefix but know the namespace, then is there a way > to construct the XPath expression. Is there a class > which I can use to map arbitrary prefixes to namespaces > and then uses those prefixes as path of the XPath expression. > If yes, what class is this?
The prefix is irrelevant -- you can use any prefix in an XPath expression, as long as it is bound to the namespace URI of the target node(s) in the XML document. All you need is to derive a class from PrefixResolver that knows the prefix and namespace URI mappings for the XPath expressions, and use that when you compile the XPath expression you are evaluating. Dave
