Friday, May 11, 2012

XPATH with namespace

In order to execute XPATH on XML file with namespace, I used following syntax while using nant's xmlpoke command
 

<xmlpoke file="myfile.xml" xpath="/x:Project/x:PropertyGroup/x:ApplicationVersion" value="1234" >
<namespaces>
<namespace prefix="x" uri="http://schemas.microsoft.com/developer/msbuild/2003" />
</namespaces>
</xmlpoke>

No comments: