I am new to Xalan. I have tried out the sample application "SimpleXPathAPI" with the command as "SimpleXPathAPI foo.xml /doc name/@last" as instructed in the docs. That resulted in the message: Warning -- No nodes matched the location path "/doc".
When I gave the namespace prefix to the above command, i.e. "SimpleXPathAPI foo.xml /foo:doc foo:name/@last" it correctly displayed the output "The string value of the result is: Marston"


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?

thanks,
Tahura




Reply via email to