void Write31_XmlSchemaAttributeGroup(XmlSchemaAttributeGroup o) {
if ((object)o == null) return;
WriteStartElement("attributeGroup");
WriteAttribute(@"id", @"", ((System.String)o.@Id));
WriteAttribute(@"name", @"", ((System.String)o.@Name));
WriteAttributes((XmlAttribute[])o.@UnhandledAttributes, o);
Write5_XmlSchemaAnnotation((XmlSchemaAnnotation)o.@Annotation);
WriteSortedItems(o.Attributes);
Write33_XmlSchemaAnyAttribute((XmlSchemaAnyAttribute)o.@AnyAttribute);
WriteEndElement();
}