Summary
Gets the value of a target node.
Syntax
[CakeMethodAlias]
public static string XmlPeek(this ICakeContext context, FilePath filePath, string xpath)
Examples
string autoFacVersion = XmlPeek("./src/Cake/packages.config", "/packages/package[@id='Autofac']/@version");
Attributes
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The context. |
filePath |
FilePath |
The target file. |
xpath |
string |
The xpath of the node to get. |
Return Value
Type |
Description |
string |
The value found at the given XPath query. |