XmlSchemaAnyAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the World Wide Web Consortium (W3C) anyAttribute element.
public ref class XmlSchemaAnyAttribute : System::Xml::Schema::XmlSchemaAnnotated
public class XmlSchemaAnyAttribute : System.Xml.Schema.XmlSchemaAnnotated
type XmlSchemaAnyAttribute = class
inherit XmlSchemaAnnotated
Public Class XmlSchemaAnyAttribute
Inherits XmlSchemaAnnotated
- Inheritance
Examples
The following example creates the anyAttribute element.
using System;
using System.Xml;
using System.Xml.Schema;
class XMLSchemaExamples
{
public static void Main()
{
XmlSchema schema = new XmlSchema();
// <element name="stringElementWithAnyAttribute">
XmlSchemaElement element = new XmlSchemaElement();
schema.Items.Add(element);
element.Name = "stringElementWithAnyAttribute";
XmlSchemaComplexType complexType = new XmlSchemaComplexType();
element.SchemaType = complexType;
XmlSchemaSimpleContent simpleContent = new XmlSchemaSimpleContent();
complexType.ContentModel = simpleContent;
// <extension base="xs:string">
XmlSchemaSimpleContentExtension extension = new XmlSchemaSimpleContentExtension();
simpleContent.Content = extension;
extension.BaseTypeName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");
// <anyAttribute namespace="##targetNamespace"/