編輯

共用方式為


XmlSchemaValidationException.SourceObject Property

Definition

Gets the XML node that caused this XmlSchemaValidationException.

public:
 property System::Object ^ SourceObject { System::Object ^ get(); };
public object? SourceObject { get; }
public object SourceObject { get; }
member this.SourceObject : obj
Public ReadOnly Property SourceObject As Object

Property Value

The XML node that caused this XmlSchemaValidationException.

Remarks

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.

Applies to