Project.

GetLocation(XmlNode) Method

Summary

Returns the NAnt.Core.Location of the given node in an XML file loaded by NAnt.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core
Containing Type
Project

Syntax

public Location GetLocation(XmlNode node)

Remarks

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

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

  • System.Xml.XmlNodeType.Whitespace
  • System.Xml.XmlNodeType.EndElement
  • System.Xml.XmlNodeType.ProcessingInstruction
  • System.Xml.XmlNodeType.XmlDeclaration
  • System.Xml.XmlNodeType.DocumentType

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

Parameters

Name Type Description
node XmlNode The System.Xml.XmlNode to get the NAnt.Core.Location for.

Return Value

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