本文整理汇总了C#中XmlTextWriter.WriteQualifiedName方法的典型用法代码示例。如果您正苦于以下问题:C# XmlTextWriter.WriteQualifiedName方法的具体用法?C# XmlTextWriter.WriteQualifiedName怎么用?C# XmlTextWriter.WriteQualifiedName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlTextWriter
的用法示例。
在下文中一共展示了XmlTextWriter.WriteQualifiedName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteXmlSchemaElement
} //WriteXmlSchemaParticle()
// XmlSchemaElement
public static void WriteXmlSchemaElement(XmlSchemaElement element, XmlSchema myXmlSchema, XmlTextWriter myXmlTextWriter)
{
myXmlTextWriter.WriteStartElement("element", XmlSchema.Namespace);
if (element.Name != null)
{
myXmlTextWriter.WriteAttributeString("name", element.Name);
}//if
if (!element.RefName.IsEmpty)
{
myXmlTextWriter.WriteStartAttribute("ref", null);
myXmlTextWriter.WriteQualifiedName(element.RefName.Name, element.RefName.Namespace);
myXmlTextWriter.WriteEndAttribute();
} //if
if (!element.SchemaTypeName.IsEmpty)
{
myXmlTextWriter.WriteStartAttribute("type", null);
myXmlTextWriter.WriteQualifiedName(element.SchemaTypeName.Name, element.SchemaTypeName.Namespace);
myXmlTextWriter.WriteEndAttribute();
} //if
if (element.SchemaType != null)
{
if (element.SchemaType is XmlSchemaComplexType)
WriteXmlSchemaComplexType((XmlSchemaComplexType)element.SchemaType, myXmlSchema, myXmlTextWriter);
else
WriteXmlSchemaSimpleType((XmlSchemaSimpleType)element.SchemaType, myXmlTextWriter);
} //if
myXmlTextWriter.WriteEndElement();
} //WriteXmlSchemaElement()
示例2: WriteXmlSchemaAttribute
} //WriteXSDSchema()
/// <summary>
/// This method writes out an XML schema attribute.
/// </summary>
/// <param name="attribute">XML schema attribute to be output.</param>
/// <param name="myXmlTextWriter">XmlTextWriter to write output to.</param>
public static void WriteXmlSchemaAttribute(XmlSchemaAttribute attribute, XmlTextWriter myXmlTextWriter)
{
myXmlTextWriter.WriteStartElement("attribute", XmlSchema.Namespace);
if (attribute.Name != null)
{
myXmlTextWriter.WriteAttributeString("name", attribute.Name);
} //if
if (!attribute.RefName.IsEmpty)
{
myXmlTextWriter.WriteStartAttribute("ref", null);
myXmlTextWriter.WriteQualifiedName(attribute.RefName.Name, attribute.RefName.Namespace);
myXmlTextWriter.WriteEndAttribute();
} //if
if (!attribute.SchemaTypeName.IsEmpty)
{
myXmlTextWriter.WriteStartAttribute("type", null);
myXmlTextWriter.WriteQualifiedName(attribute.SchemaTypeName.Name, attribute.SchemaTypeName.Namespace);
myXmlTextWriter.WriteEndAttribute();
} //if
if (attribute.SchemaType != null)
{
WriteXmlSchemaSimpleType(attribute.SchemaType, myXmlTextWriter);
} //if
myXmlTextWriter.WriteEndElement();
} //WriteXmlSchemaAttribute()