public void WriteXml(XmlWriter writer) { foreach (ICodedEntry item in codedEntries) { ITemplateConstraint textTemplate = (ITemplateConstraint)item; string templateId = textTemplate.getTemplateID(); string templateText = textTemplate.getTemplateText(); writer.WriteStartElement("entry"); writer.WriteAttributeString("typeCode", "COMP"); writer.WriteAttributeString("contextConductionInd", "true"); its.TemplateLookAhead(templateId + "#" + templateText, writer); textTemplate.WriteXml(writer); writer.WriteEndElement(); } foreach (ITextSection item in textSection) { ITemplateConstraint textTemplate = (ITemplateConstraint)item; string templateId = textTemplate.getTemplateID(); string templateText = textTemplate.getTemplateText(); writer.WriteStartElement("component"); writer.WriteAttributeString("typeCode", "COMP"); writer.WriteAttributeString("contextConductionInd", "true"); its.TemplateLookAhead(templateId + "#" + templateText, writer); textTemplate.WriteXml(writer); writer.WriteEndElement(); } }
public void WriteXml(XmlWriter writer) { writer.WriteAttributeString("typeCode", typeCode); if (contextControlCode != null) { writer.WriteAttributeString("contextControlCode", contextControlCode); } if (templateId != null) { its.TemplateSignpost(templateId.Extension + "#" + itsParticipantTag, writer); } its.TemplateLookAhead(Role.getTemplateID() + "#" + Role.getTemplateText(), writer); FormatterHelper.SerialiseDataType(time, writer, "time"); writer.WriteStartElement(itsRoleTag); Role.WriteXml(writer); writer.WriteEndElement(); }
public void WriteXml(XmlWriter writer) { writer.WriteAttributeString("typeCode", "COMP"); writer.WriteAttributeString("contextConductionInd", "true"); #region nonXML if (bodyIsNonXml) { bool fileExists = false; if (!File.Exists(this.nonXMLBodyFileName)) { fileExists = false; } else { writer.WriteStartElement("nonXMLBody"); writer.WriteAttributeString("classCode", "DOCBODY"); writer.WriteAttributeString("moodCode", "EVN"); writer.WriteStartElement("text"); writer.WriteAttributeString("mediaType", this.mimeType); writer.WriteAttributeString("representation", "B64"); writer.WriteValue(its.B64(this.nonXMLBodyFileName)); writer.WriteEndElement(); writer.WriteEndElement(); } } #endregion #region structured if (bodyIsStructured) { writer.WriteStartElement("structuredBody"); writer.WriteAttributeString("classCode", "DOCBODY"); writer.WriteAttributeString("moodCode", "EVN"); writer.WriteStartElement("component"); writer.WriteAttributeString("typeCode", "COMP"); writer.WriteAttributeString("contextConductionInd", "true"); #region START - Classification Section writer.WriteStartElement("section"); writer.WriteAttributeString("classCode", "DOCSECT"); writer.WriteAttributeString("moodCode", "EVN"); writer.WriteStartElement("id"); writer.WriteAttributeString("root", Id.ToString().ToUpper()); writer.WriteEndElement(); #endregion if (codedEntries != null) { foreach (ICodedEntry item in codedEntries) { ITemplateConstraint textTemplate = (ITemplateConstraint)item; string templateId = textTemplate.getTemplateID(); string templateText = textTemplate.getTemplateText(); writer.WriteStartElement("entry"); writer.WriteAttributeString("typeCode", "COMP"); writer.WriteAttributeString("contextConductionInd", "true"); its.TemplateLookAhead(templateId + "#" + templateText, writer); textTemplate.WriteXml(writer); writer.WriteEndElement(); } } if (textSection != null) { foreach (ITextSection item in textSection) { ITemplateConstraint textTemplate = (ITemplateConstraint)item; string templateId = textTemplate.getTemplateID(); string templateText = textTemplate.getTemplateText(); writer.WriteStartElement("component"); writer.WriteAttributeString("typeCode", "COMP"); writer.WriteAttributeString("contextConductionInd", "true"); its.TemplateLookAhead(templateId + "#" + templateText, writer); textTemplate.WriteXml(writer); writer.WriteEndElement(); } } writer.WriteEndElement(); // section :: Classification Section writer.WriteEndElement(); // component writer.WriteEndElement(); // structuredBody } #endregion }