|
If I have an instance document like so: <Pipeline xmlns="http://nrg.wustl.edu/pipeline" xmlns:prov="http://www.nbirn.net/prov" xmlns:xdat="http://nrg.wustl.edu/xdat" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nrg.wustl.edu/xnat C:\\schema\pipeline.xsd"> <parameters> <parameter> <name>fidldir</name> <value>/fidl/fidl_2.60/bin</value> </parameter> <parameter> <name>rlbdir</name> <value>/Pipeline/parameters/parameter[name='fidldir']/value/text() </value> </parameter> </parameters> </Pipeline> And I want to evaluate the xpath _expression_: /Pipeline/parameters/parameter[name='fidldir']/value/text() Is it necessary for the namespace prefix of pipeline: to be
present in the _expression_ /Pipeline/parameters/parameter[name='fidldir']/value/text() for xpath to be evaluated correctly? Ie should the _expression_ be: /pipeline:Pipeline/pipeline:parameters/pipeline:parameter[pipeline:name='fidldir']/pipeline:value/text() (as in the samples) How do I set the namespace so that the
instance document xpath _expression_ need not have the namespace prefixed. I have
looked into XmlOptions and didn’t find anything useful. |
- XPath and Namespace Mohana Ramaratnam
- RE: XPath and Namespace Radu Preotiuc-Pietro

