NMF.Serialization.Xmi.XmiSerializer.WriteBeginElement C# (CSharp) Method

WriteBeginElement() protected method

protected WriteBeginElement ( System writer, object obj, ITypeSerializationInfo info ) : void
writer System
obj object
info ITypeSerializationInfo
return void
        protected override void WriteBeginElement(System.Xml.XmlWriter writer, object obj, ITypeSerializationInfo info)
        {
            string prefix = info.NamespacePrefix;
            if (prefix == null)
            {
                prefix = writer.LookupPrefix(info.Namespace);
            }
            else if (writer.LookupPrefix(info.Namespace) == null)
            {
                writer.WriteAttributeString("xmlns", prefix, null, info.Namespace);
            }
            string value = prefix + ":" + info.ElementName;
            writer.WriteAttributeString(XMLSchemaInstancePrefix, TypeField, XMLSchemaInstanceNamespace, value);
        }