internal static void WriteXml(XmlWriter writer, DvText text) { if (text.GetType() != typeof(DvText)) { string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string oePrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string typeName = ((IRmType)text).GetRmTypeName(); if (!string.IsNullOrEmpty(oePrefix)) { typeName = oePrefix + ":" + typeName; } writer.WriteAttributeString(xsiPrefix, "type", XsiNamespace, typeName); } ((System.Xml.Serialization.IXmlSerializable)text).WriteXml(writer); }