<xmlpeek
file="${prjconfig}"
xpath="Project/ExeName"
property="newexe"
failonerror="false"/>
fails on XML like: <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://nant.sf.net/release/0.86-beta1/nant.xsd">
<ExeName>foo</ExeName>
</Project>
The reason is namespace associated with XML file. To enable this we have to extend xmlpeek task to be namespace-aware.
I suggest this syntax: <xmlpeek
file="${prjconfig}"
xpath="x:Project/x:ExeName" property="newexe"
failonerror="false"> <namespace name="x" ns="http://nant.sf.net/release/0.86-beta1/nant.xsd"/> </xmlpeek>
file="${prjconfig}"
xpath="Project/ExeName"
property="newexe"
failonerror="false"/>
fails on XML like: <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://nant.sf.net/release/0.86-beta1/nant.xsd">
<ExeName>foo</ExeName>
</Project>
The reason is namespace associated with XML file. To enable this we have to extend xmlpeek task to be namespace-aware.
I suggest this syntax: <xmlpeek
file="${prjconfig}"
xpath="x:Project/x:ExeName" property="newexe"
failonerror="false"> <namespace name="x" ns="http://nant.sf.net/release/0.86-beta1/nant.xsd"/> </xmlpeek>