void Write9_XmlSchemaSimpleType(XmlSchemaSimpleType o) {
if ((object)o == null) return;
WriteStartElement("simpleType");
WriteAttribute(@"id", @"", ((System.String)o.@Id));
WriteAttributes((XmlAttribute[])o.@UnhandledAttributes, o);
WriteAttribute(@"name", @"", ((System.String)o.@Name));
WriteAttribute(@"final", @"", Write11_XmlSchemaDerivationMethod(o.FinalResolved));
Write5_XmlSchemaAnnotation((XmlSchemaAnnotation)o.@Annotation);
if (o.@Content is XmlSchemaSimpleTypeUnion) {
Write12_XmlSchemaSimpleTypeUnion((XmlSchemaSimpleTypeUnion)o.@Content);
}
else if (o.@Content is XmlSchemaSimpleTypeRestriction) {
Write15_XmlSchemaSimpleTypeRestriction((XmlSchemaSimpleTypeRestriction)o.@Content);
}
else if (o.@Content is XmlSchemaSimpleTypeList) {
Write14_XmlSchemaSimpleTypeList((XmlSchemaSimpleTypeList)o.@Content);
}
WriteEndElement();
}