This topic has not yet been rated - Rate this topic

XmlSchemaValidator.SkipToEndElement Method

Skips validation of the current element content and prepares the XmlSchemaValidator object to validate content in the parent element's context.

Namespace:  System.Xml.Schema
Assembly:  System.Xml (in System.Xml.dll)
public void SkipToEndElement(
	XmlSchemaInfo schemaInfo
)

Parameters

schemaInfo
Type: System.Xml.Schema.XmlSchemaInfo
An XmlSchemaInfo object whose properties are set if the current element content is successfully skipped. This parameter can be null.
Exception Condition
InvalidOperationException

The SkipToEndElement method was not called in the correct sequence. For example, calling SkipToEndElement after calling SkipToEndElement.

The following are important notes to consider when using the SkipToEndElement method.

  • The SkipToEndElement method skips validation of the current element content and prepares the XmlSchemaValidator object to validate content in the parent element's context; it is equivalent to skipping validation for all the children of the current element and then calling the ValidateEndElement method.

  • If the current element content is successfully skipped, the XmlSchemaInfo object's (if specified) Validity property is set to NotKnown.

Note Note

No validation errors are reported on skipped content.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ