<xmlpeek>Extracts text from a given XPath Query.
| Attribute | Type | Description | Required |
|---|
| file | string | The name of the file that contains the XML document that is going to be peeked at. | True |
| property | string | The property that receives the text representation of the XML inside the node returned from the XPath expression. | True |
| xpath | string | The XPath expression used to select which node to read. | True |
| nodeindex | int | The index of the node that gets its text returned when the query returns multiple nodes. | False |
| failonerror | bool | Determines whether task failure stops the build or is just reported. The default is true. | False |
| if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False |
| unless | bool | Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. | False |
| verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False |
Example
<xmlpeek
file="App.config"
xpath="/configuration/appSettings/add[@key = 'server']/@value"
property="configuration.server" />