NAnt SDK Documentation - v0.92

Project.GetLocation Method 

Returns the Location of the given node in an XML file loaded by NAnt.

[Visual Basic]
Public Function GetLocation( _
   ByVal node As XmlNode _
) As Location
[C#]
public Location GetLocation(
   XmlNode node
);

Parameters

node
The XmlNode to get the Location for.

Return Value

Location of the given node in an XML file loaded by NAnt, or UnknownLocation if the node was not loaded from an XML file.

Remarks

The node must be from an XmlDocument that has been loaded by NAnt.

NAnt also does not process any of the following node types:

As a result, no location information is available for these nodes.

Exceptions

Exception TypeCondition
ArgumentException

node is from an XML file that was not loaded by NAnt.

-or

node was not processed by NAnt (eg. an XML declaration).

See Also

Project Class | NAnt.Core Namespace