<xmlpeek>

[This is preliminary documentation and subject to change.]

Extracts text from an XML file at the location specified by an XPath expression.

If the XPath expression specifies multiple nodes the node index is used to determine which of the nodes' text is returned.

Parameters

Attribute Type Description Required
file file 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 if 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

Nested Elements:

<namespaces>

<namespace ... />

Namespace definitions to resolve prefixes in the XPath expression.

Contains a collection of XmlNamespace elements.

<namespace ... />
...

</namespaces>

Examples

Requirements

Assembly: NAnt.Core (0.85.1793.0)