XmlSchemaValidator.SkipToEndElement(XmlSchemaInfo) Method

Definition

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

public void SkipToEndElement (System.Xml.Schema.XmlSchemaInfo? schemaInfo);
public void SkipToEndElement (System.Xml.Schema.XmlSchemaInfo schemaInfo);

Parameters

schemaInfo
XmlSchemaInfo

An XmlSchemaInfo object whose properties are set if the current element content is successfully skipped. This parameter can be null.

Exceptions

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

Remarks

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

No validation errors are reported on skipped content.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also