My sample.xml file is below
<deployment>
<definition type="xpath">
<xpath>configuration/Settings/add[@key='NetworkPath'][@value]</xpath>
<attribute>value</attribute>
<value>http://www.google.com</value>
</definition>
</deployment>
I want to fetch the value "http://www.google.com" corresponsing to xpath "configuration/Settings/add[@key='NetworkPath'][@value]". I am writing below XmlPeek task but it is not working
<XmlPeek XmlInputPath="C:\Sample.xml"
Query="configuration/Settings/add[@key='NetworkPath'][@value]">
<Output TaskParameter="Result" ItemName="Peeked" />
</XmlPeek>
<Message Text="Peeked value is @(Peeked)"/>