Nant xmlpoke and unique nodes

Posted by Lou Franco on Stack Overflow See other posts from Stack Overflow or by Lou Franco
Published on 2010-04-06T12:30:23Z Indexed on 2010/04/06 12:33 UTC
Read the original article Hit count: 403

Filed under:
|

I am trying to use an xmlpoke task to update a VS Project File (which is XML). In the Project root, there are multiple PropertyGroup nodes, I am trying to select the first one. The XML looks like this

 <Project>
    <PropertyGroup>
    </PropertyGroup>
    <PropertyGroup>
    </PropertyGroup>
    <PropertyGroup>
    </PropertyGroup>
 </Project>

I am using an xpath of //Project/PropertyGroup[1] to get the first PropertyGroup, but I get the error: “Non-unique xpath given //Project/PropertyGroup[1]”.

© Stack Overflow or respective owner

Related posts about nant

Related posts about xmlpoke