This topic has not yet been rated - Rate this topic

XmlSchemaValidator.GetExpectedAttributes Method

Returns the expected attributes for the current element context.

Namespace:  System.Xml.Schema
Assembly:  System.Xml (in System.Xml.dll)
public XmlSchemaAttribute[] GetExpectedAttributes()

Return Value

Type: System.Xml.Schema.XmlSchemaAttribute[]
An array of XmlSchemaAttribute objects or an empty array if there are no expected attributes.

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

  • If the GetExpectedAttributes method is called immediately after the ValidateElement method, all the attributes that could appear in the XML document are returned.

  • If the GetExpectedAttributes method is called after one or more calls to the ValidateAttribute method, the attributes that haven't yet been validated for the current element are returned.

.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