XmlSchemaValidationException::SourceObject Property

 

Gets the XML node that caused this XmlSchemaValidationException.

Namespace:   System.Xml.Schema
Assembly:  System.Xml (in System.Xml.dll)

public:
property Object^ SourceObject {
	Object^ get();
}

Property Value

Type: System::Object^

The XML node that caused this XmlSchemaValidationException.

When an XmlSchemaValidationException is thrown during validation of a class that implements the IXPathNavigable interface such as the XPathNavigator or XmlNode class, the object returned by the SourceObject property is an instance of a class that implements the IXPathNavigable interface.

When an XmlSchemaValidationException is thrown during validation by a validating XmlReader object, the value of the SourceObject property is null.

.NET Framework
Available since 2.0
Return to top
Show: