I am trying to use the xmlpoke task to update the VS project file (which is XML). There are several PropertyGroup nodes in the Project root, I'm trying to select the first one. XML looks like this:
<Project> <PropertyGroup> </PropertyGroup> <PropertyGroup> </PropertyGroup> <PropertyGroup> </PropertyGroup> </Project>
I use xpath from //Project/PropertyGroup[1]
to get the first PropertyGroup, but I get the error: "Optional xpath given by // Project / PropertyGroup [1]".
Edit: Sorry, I didnβt think it was important (but it does), Project has a namespace. I put the right XML with the right xmlpoke as the answer for any future search engines.
source share