public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.IQualificationType element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._Write ( xmlWriter, "type", Configuration.Namespaces.DublinCoreNamespaceUri, element.Value, element.RenderRaw, element.XsiTypeValue, element.XsiTypeValueNamespace, element.XmlLanguage ); }
public void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP11.IProvider provider ) { if (provider == null) throw new ArgumentNullException("provider"); if ((provider.CompatibleWith & XCRIProfiles.XCRI_v1_1) == 0) return; this._WriteStartElement(xmlWriter, "provider", Configuration.Namespaces.XCRICAP11NamespaceUri); if ( (provider.Identifiers.Count == 0) && (provider.Url != null) ) { provider.Identifiers.Add(new Identifier() { Value = provider.Url.ToString() }); } if (provider.ReferenceNumber.HasValue) { Identifier ident = new Identifier() { Value = provider.ReferenceNumber.Value.ToString() }; ident.XsiTypeValue = "ukprn"; ident.XsiTypeValueNamespace = Configuration.Namespaces.UKRegisterOfLearningProvidersNamespaceUri; provider.Identifiers.Add(ident); } this.WriteXCRI11OrganisationItem(xmlWriter, (XCRI.Interfaces.XCRICAP11.IOrganisation)provider); foreach (XCRI.Interfaces.ICourse course in provider.Courses) this.Write(xmlWriter, course); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ISubject subject ) { if (subject == null) throw new ArgumentNullException("subject"); if ((subject.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; if (String.IsNullOrEmpty(subject.Value)) return; base._Write ( xmlWriter, "subject", Configuration.Namespaces.DublinCoreNamespaceUri, subject.Value, subject.RenderRaw, subject.XsiTypeValue, subject.XsiTypeValueNamespace, subject.XmlLanguage ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IImage image ) { if (image == null) throw new ArgumentNullException("image"); if ((image.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "image", Configuration.Namespaces.XCRICAP12NamespaceUri); this._WriteXsiTypeAttribute(xmlWriter, image.XsiTypeValue, image.XsiTypeValueNamespace); this._WriteXmlLanguageAttribute(xmlWriter, image.XmlLanguage); if (image.Source != null) if (String.IsNullOrEmpty(xmlWriter.LookupPrefix(Configuration.Namespaces.XCRICAP11NamespaceUri))) xmlWriter.WriteAttributeString("src", image.Source.ToString()); else xmlWriter.WriteAttributeString("src", Configuration.Namespaces.XCRICAP11NamespaceUri, image.Source.ToString()); if (String.IsNullOrEmpty(image.Title) == false) if (String.IsNullOrEmpty(xmlWriter.LookupPrefix(Configuration.Namespaces.XCRICAP11NamespaceUri))) xmlWriter.WriteAttributeString("title", image.Title); else xmlWriter.WriteAttributeString("title", Configuration.Namespaces.XCRICAP11NamespaceUri, image.Title); if (String.IsNullOrEmpty(image.Alt) == false) if (String.IsNullOrEmpty(xmlWriter.LookupPrefix(Configuration.Namespaces.XCRICAP11NamespaceUri))) xmlWriter.WriteAttributeString("alt", image.Alt); else xmlWriter.WriteAttributeString("alt", Configuration.Namespaces.XCRICAP11NamespaceUri, image.Alt); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IDescription description ) { this.WriteDescription ( xmlWriter, description, "description", Configuration.Namespaces.DublinCoreNamespaceUri ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ICatalog catalog ) { if (catalog == null) throw new ArgumentNullException("catalog"); if ((catalog.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "catalog", Configuration.Namespaces.XCRICAP12NamespaceUri); if (catalog.Generated.HasValue == false) if (String.IsNullOrEmpty(xmlWriter.LookupPrefix(Configuration.Namespaces.XCRICAP12NamespaceUri))) xmlWriter.WriteAttributeString("generated", (new DateTimeOffset(DateTime.Now)).ToISO8601(true)); else xmlWriter.WriteAttributeString("generated", Configuration.Namespaces.XCRICAP12NamespaceUri, (new DateTimeOffset(DateTime.Now)).ToISO8601(true)); else if (String.IsNullOrEmpty(xmlWriter.LookupPrefix(Configuration.Namespaces.XCRICAP12NamespaceUri))) xmlWriter.WriteAttributeString("generated", catalog.Generated.Value.ToISO8601(true)); else xmlWriter.WriteAttributeString("generated", Configuration.Namespaces.XCRICAP12NamespaceUri, catalog.Generated.Value.ToISO8601(true)); this.WriteXCRI12CommonElements(xmlWriter, catalog); foreach (XCRI.Interfaces.XCRICAP12.IProvider provider in catalog.Providers) if (provider != null) this.Write(xmlWriter, provider); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IQualification element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement ( xmlWriter, "qualification", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri ); foreach (XCRI.Interfaces.XCRICAP12.IIdentifier identifier in element.Identifiers) this.Write(xmlWriter, identifier); foreach (XCRI.Interfaces.XCRICAP12.ITitle title in element.Titles) this.Write(xmlWriter, title); if(element.Abbreviation != null) this.Write(xmlWriter, element.Abbreviation); foreach (XCRI.Interfaces.XCRICAP12.IDescription desc in element.Descriptions) this.WriteDescription(xmlWriter, desc, "description", Configuration.Namespaces.DublinCoreNamespaceUri); if (element.EducationLevel != null) this.Write(xmlWriter, element.EducationLevel); if (element.Type != null) this.Write(xmlWriter, element.Type); if (element.Url != null) this.Write(xmlWriter, element.Url); if ((element.AwardedBy != null) && (element.AwardedBy.Count > 0)) this.Write(xmlWriter, element.AwardedBy[0]); if ((element.AccreditedBy != null) && (element.AccreditedBy.Count > 0)) this.Write(xmlWriter, element.AccreditedBy[0]); this._WriteEndElement(xmlWriter); }
protected virtual void WriteXCRI12CommonElements( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ICommonElements commonElements ) { if (commonElements == null) throw new ArgumentNullException("commonElements"); if ((commonElements.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; foreach (XCRI.Interfaces.XCRICAP12.IContributor contributor in commonElements.Contributors) if (contributor != null) this.Write(xmlWriter, contributor); foreach (XCRI.Interfaces.XCRICAP12.IDescription description in commonElements.Descriptions) if (description != null) this.Write(xmlWriter, description); foreach (XCRI.Interfaces.XCRICAP12.IIdentifier identifier in commonElements.Identifiers) if (identifier != null) this.Write(xmlWriter, identifier); if (commonElements.Image != null) this.Write(xmlWriter, commonElements.Image); foreach (XCRI.Interfaces.XCRICAP12.ISubject subject in commonElements.Subjects) if (subject != null) this.Write(xmlWriter, subject); foreach (XCRI.Interfaces.XCRICAP12.ITitle title in commonElements.Titles) if (title != null) this.Write(xmlWriter, title); foreach (XCRI.Interfaces.XCRICAP12.IType type in commonElements.Types) if (type != null) this.Write(xmlWriter, type); if (commonElements.Url != null) this.Write(xmlWriter, commonElements.Url); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IPrerequisite element ) { this.WriteDescription ( xmlWriter, element as XCRI.Interfaces.XCRICAP12.IDescription, "prerequisite", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri ); }
protected virtual void WriteDescription( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IDescription description, string elementName, string elementNamespace ) { if (description == null) throw new ArgumentNullException("description"); if ((description.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, elementName, elementNamespace); this._WriteXsiTypeAttribute ( xmlWriter, description.XsiTypeValue, description.XsiTypeValueNamespace ); this._WriteXmlLanguageAttribute ( xmlWriter, description.XmlLanguage ); switch (description.ContentType) { case DescriptionContentTypes.Href: if (description.Href != null) this._WriteAttribute ( xmlWriter, "href", elementNamespace, description.Href.ToString(), String.Empty ); break; case DescriptionContentTypes.XHTML: this._WriteStartElement(xmlWriter, "div", Configuration.Namespaces.XHTMLNamespaceUri); if (!String.IsNullOrEmpty(description.Value)) xmlWriter.WriteRaw ( description.Value ); this._WriteEndElement(xmlWriter); break; case DescriptionContentTypes.Text: xmlWriter.WriteValue ( description.Value ); break; } this._WriteEndElement(xmlWriter); }
protected virtual void WriteXCRI12CommonAndCommonDescriptiveElements( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ICommonAndCommonDescriptiveElements commonAndCommonDescriptiveElements ) { if (commonAndCommonDescriptiveElements == null) throw new ArgumentNullException("commonAndCommonDescriptiveElements"); if ((commonAndCommonDescriptiveElements.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this.WriteXCRI12CommonElements ( xmlWriter, commonAndCommonDescriptiveElements as XCRI.Interfaces.XCRICAP12.ICommonElements ); foreach (XCRI.Interfaces.XCRICAP12.IAbstract element in commonAndCommonDescriptiveElements.Abstracts) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IApplicationProcedure element in commonAndCommonDescriptiveElements.ApplicationProcedures) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IAssessment element in commonAndCommonDescriptiveElements.Assessments) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.ILearningOutcome element in commonAndCommonDescriptiveElements.LearningOutcomes) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IObjective element in commonAndCommonDescriptiveElements.Objectives) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IPrerequisite element in commonAndCommonDescriptiveElements.Prerequisites) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IRegulations element in commonAndCommonDescriptiveElements.Regulations) this.Write(xmlWriter, element); }
protected virtual void WriteXCRI11OrganisationItem( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP11.IOrganisation organisationItem ) { this.WriteXCRI11GenericItem(xmlWriter, (XCRI.Interfaces.XCRICAP11.IGeneric)organisationItem); if(organisationItem.Location != null) this.WriteXCRI11Address(xmlWriter, (XCRI.Interfaces.XCRICAP11.ILocation)organisationItem.Location); if (String.IsNullOrEmpty(organisationItem.PhoneNumber) == false) xmlWriter.WriteElementString("phone", Configuration.Namespaces.XCRICAP11NamespaceUri, organisationItem.PhoneNumber); if (String.IsNullOrEmpty(organisationItem.FaxNumber) == false) xmlWriter.WriteElementString("fax", Configuration.Namespaces.XCRICAP11NamespaceUri, organisationItem.FaxNumber); if (String.IsNullOrEmpty(organisationItem.EmailAddress) == false) xmlWriter.WriteElementString("email", Configuration.Namespaces.XCRICAP11NamespaceUri, organisationItem.EmailAddress); }
protected virtual void WriteXCRI11GenericItem( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP11.IGeneric genericItem ) { if (genericItem == null) throw new ArgumentNullException("genericItem"); if ((genericItem.CompatibleWith & XCRIProfiles.XCRI_v1_1) == 0) return; this.Write(xmlWriter, genericItem.ResourceStatus); this._WriteXsiTypeAttribute(xmlWriter, genericItem.XsiTypeValue, genericItem.XsiTypeValueNamespace); this._WriteXmlLanguageAttribute(xmlWriter, genericItem.XmlLanguage); foreach (XCRI.Interfaces.XCRICAP11.IIdentifier identifier in genericItem.Identifiers) if (identifier != null) this.Write(xmlWriter, identifier); foreach (XCRI.Interfaces.XCRICAP11.ITitle title in genericItem.Titles) if (title != null) this.Write(xmlWriter, title); foreach (XCRI.Interfaces.XCRICAP11.ISubject subject in genericItem.Subjects) if (subject != null) this.Write(xmlWriter, subject); foreach (XCRI.Interfaces.XCRICAP11.IDescription description in genericItem.Descriptions) if (description != null) this.Write(xmlWriter, description); if (genericItem.Url != null) this.Write(xmlWriter, genericItem.Url); if (genericItem.Image != null) this.Write(xmlWriter, genericItem.Image); }
protected virtual void WriteXCRI11Address( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP11.ILocation addressItem ) { this.WriteLatitudeLongitude ( xmlWriter, addressItem.Latitude, addressItem.Longitude ); if (String.IsNullOrEmpty(addressItem.Street) == false) xmlWriter.WriteElementString("street", Configuration.Namespaces.XCRICAP11NamespaceUri, addressItem.Street); if (String.IsNullOrEmpty(addressItem.Town) == false) xmlWriter.WriteElementString("town", Configuration.Namespaces.XCRICAP11NamespaceUri, addressItem.Town); if (String.IsNullOrEmpty(addressItem.Postcode) == false) xmlWriter.WriteElementString("postcode", Configuration.Namespaces.XCRICAP11NamespaceUri, addressItem.Postcode); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.IEngagement element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; base._Write ( xmlWriter, "engagement", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, element.Value, element.RenderRaw, element.XsiTypeValue, element.XsiTypeValueNamespace, element.XmlLanguage ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IApplicationProcedure element ) { this.WriteDescription ( xmlWriter, element as XCRI.Interfaces.XCRICAP12.IDescription, "applicationProcedure", Configuration.Namespaces.XCRICAP12NamespaceUri ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.IAttendancePattern element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; if (String.IsNullOrEmpty(element.Value)) return; this._WriteStartElement(xmlWriter, "attendancePattern", Configuration.Namespaces.XCRICAP12NamespaceUri); string identifier = String.Empty; if (this._TryExtractAttendancePatternIdentifierFromRecommendedVocab(element.Value, out identifier)) this._WriteAttribute ( xmlWriter, "identifier", String.Empty, identifier, String.Empty ); xmlWriter.WriteValue(element.Value); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ILearningOutcome element ) { this.WriteDescription ( xmlWriter, element as XCRI.Interfaces.XCRICAP12.IDescription, "learningOutcome", Configuration.Namespaces.XCRICAP12NamespaceUri ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IEducationLevel element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; base._Write ( xmlWriter, "educationLevel", Configuration.Namespaces.DublinCoreTermsNamespaceUri, element.Value, element.RenderRaw, element.XsiTypeValue, element.XsiTypeValueNamespace, element.XmlLanguage ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IRegulations element ) { this.WriteDescription ( xmlWriter, element as XCRI.Interfaces.XCRICAP12.IDescription, "regulations", Configuration.Namespaces.XCRICAP12NamespaceUri ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IDate date, string elementName, string elementNamespace ) { if (date == null) throw new ArgumentNullException("date"); if ((date.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, elementName, elementNamespace); this._WriteAttribute ( xmlWriter, "dtf", String.Empty, date.Value.ToISO8601(), String.Empty ); if (String.IsNullOrEmpty(date.DisplayValue) == false) xmlWriter.WriteString(date.DisplayValue); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IProvider provider ) { if (provider == null) throw new ArgumentNullException("provider"); if ((provider.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "provider", Configuration.Namespaces.XCRICAP12NamespaceUri); this.WriteXCRI12CommonElements(xmlWriter, provider); foreach (XCRI.Interfaces.XCRICAP12.ICourse course in provider.Courses) if (course != null) this.Write(xmlWriter, course); foreach (XCRI.Interfaces.XCRICAP12.ILocation location in provider.Locations) if (location != null) this.Write(xmlWriter, location); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ILocation location ) { if (location == null) throw new ArgumentNullException("location"); if ((location.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "location", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri); if (String.IsNullOrEmpty(location.Postcode) == false) this._Write(xmlWriter, "postcode", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, location.Postcode, false, String.Empty, String.Empty, String.Empty); this.WriteLatitudeLongitude(xmlWriter, location.Latitude, location.Longitude); if (String.IsNullOrEmpty(location.Street) == false) this._Write(xmlWriter, "address", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, location.Street, false, String.Empty, String.Empty, String.Empty); if (String.IsNullOrEmpty(location.Town) == false) this._Write(xmlWriter, "address", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, location.Town, false, String.Empty, String.Empty, String.Empty); if (String.IsNullOrEmpty(location.PhoneNumber) == false) this._Write(xmlWriter, "phone", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, location.PhoneNumber, false, String.Empty, String.Empty, String.Empty); if (String.IsNullOrEmpty(location.FaxNumber) == false) this._Write(xmlWriter, "fax", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, location.FaxNumber, false, String.Empty, String.Empty, String.Empty); if (String.IsNullOrEmpty(location.EmailAddress) == false) this._Write(xmlWriter, "email", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, location.EmailAddress, false, String.Empty, String.Empty, String.Empty); if (location.Url != null) this.Write(xmlWriter, location.Url); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.ICourse course ) { if (course == null) throw new ArgumentNullException("course"); if ((course.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "course", Configuration.Namespaces.XCRICAP12NamespaceUri); this.WriteXCRI12CommonAndCommonDescriptiveElements ( xmlWriter, course as XCRI.Interfaces.XCRICAP12.ICommonAndCommonDescriptiveElements ); foreach (XCRI.Interfaces.XCRICAP12.ICourseLevel element in course.Levels) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IQualification element in course.Qualifications) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.EducationalCredit.ICredit element in course.Credits) this.Write(xmlWriter, element); foreach (XCRI.Interfaces.XCRICAP12.IPresentation element in course.Presentations) this.Write(xmlWriter, element); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IIdentifier identifier ) { if (identifier == null) throw new ArgumentNullException("identifier"); if ((identifier.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; base._Write ( xmlWriter, "identifier", Configuration.Namespaces.DublinCoreNamespaceUri, identifier.Value, identifier.RenderRaw, identifier.XsiTypeValue, identifier.XsiTypeValueNamespace, identifier.XmlLanguage ); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.IVenue element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "venue", Configuration.Namespaces.XCRICAP12NamespaceUri); this._WriteStartElement(xmlWriter, "provider", Configuration.Namespaces.XCRICAP12NamespaceUri); foreach (XCRI.Interfaces.XCRICAP12.ITitle title in element.Titles) if (title != null) this.Write(xmlWriter, title); this.Write(xmlWriter, element.Location); this._WriteEndElement(xmlWriter); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.EducationalCredit.ICredit element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "credit", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri); foreach (string scheme in element.Schemes) this._Write ( xmlWriter, "scheme", Configuration.Namespaces.CENEducationalCreditInformationModelNamespaceUri, scheme, false, String.Empty, String.Empty, String.Empty ); foreach (string level in element.Levels) this._Write ( xmlWriter, "level", Configuration.Namespaces.CENEducationalCreditInformationModelNamespaceUri, level, false, String.Empty, String.Empty, String.Empty ); foreach (string value in element.Values) this._Write ( xmlWriter, "value", Configuration.Namespaces.CENEducationalCreditInformationModelNamespaceUri, value, false, String.Empty, String.Empty, String.Empty ); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IPresentation element ) { if (element == null) throw new ArgumentNullException("element"); if ((element.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; this._WriteStartElement(xmlWriter, "presentation", Configuration.Namespaces.XCRICAP12NamespaceUri); this.WriteXCRI12CommonAndCommonDescriptiveElements ( xmlWriter, element as XCRI.Interfaces.XCRICAP12.ICommonAndCommonDescriptiveElements ); if (element.Start != null) this.Write ( xmlWriter, element.Start, "start", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri ); if (element.End != null) this.Write ( xmlWriter, element.End, "end", Configuration.Namespaces.XCRICAP12NamespaceUri ); if (element.Duration.HasValue && element.Duration.Value != TimeSpan.Zero) this.Write ( xmlWriter, element.Duration.Value, "duration", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri ); if (element.ApplyUntil != null) this.Write ( xmlWriter, element.ApplyUntil, "applyUntil", Configuration.Namespaces.XCRICAP12NamespaceUri ); if (String.IsNullOrEmpty(element.ApplyTo) == false) this._Write ( xmlWriter, "applyTo", Configuration.Namespaces.XCRICAP12NamespaceUri, element.ApplyTo, false, String.Empty, String.Empty, String.Empty ); foreach (XCRI.Interfaces.IEngagement engagement in element.Engagements) this.Write(xmlWriter, engagement); if(element.StudyMode != null) this.Write(xmlWriter, element.StudyMode); if (element.AttendanceMode != null) this.Write(xmlWriter, element.AttendanceMode); if (element.AttendancePattern != null) this.Write(xmlWriter, element.AttendancePattern); foreach (string language in element.LanguagesOfInstruction) this._Write ( xmlWriter, "languageOfInstruction", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, language, false, String.Empty, String.Empty, String.Empty ); foreach (string language in element.LanguagesOfAssessment) this._Write ( xmlWriter, "languageOfAssessment", Configuration.Namespaces.XCRICAP12NamespaceUri, language, false, String.Empty, String.Empty, String.Empty ); if (String.IsNullOrEmpty(element.PlacesAvailable) == false) this._Write ( xmlWriter, "places", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, element.PlacesAvailable, false, String.Empty, String.Empty, String.Empty ); if (String.IsNullOrEmpty(element.Cost) == false) this._Write ( xmlWriter, "cost", Configuration.Namespaces.MetadataForLearningOpportunitiesNamespaceUri, element.Cost, false, String.Empty, String.Empty, String.Empty ); if (String.IsNullOrEmpty(element.AgeRange) == false) this._Write ( xmlWriter, "age", Configuration.Namespaces.XCRICAP12NamespaceUri, element.AgeRange, false, String.Empty, String.Empty, String.Empty ); foreach (XCRI.Interfaces.IVenue venue in element.Venues) this.Write(xmlWriter, venue); this._WriteEndElement(xmlWriter); }
public virtual void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP12.IType type ) { if (type == null) throw new ArgumentNullException("type"); if ((type.CompatibleWith & XCRIProfiles.XCRI_v1_2) == 0) return; base._Write ( xmlWriter, "type", Configuration.Namespaces.DublinCoreNamespaceUri, type.Value, type.RenderRaw, type.XsiTypeValue, type.XsiTypeValueNamespace, type.XmlLanguage ); }
public void Write( System.Xml.XmlWriter xmlWriter, XCRI.Interfaces.XCRICAP11.ICourse course ) { if (course == null) throw new ArgumentNullException("course"); if ((course.CompatibleWith & XCRIProfiles.XCRI_v1_1) == 0) return; this._WriteStartElement(xmlWriter, "course", Configuration.Namespaces.XCRICAP11NamespaceUri); this.WriteXCRI11GenericItem(xmlWriter, (XCRI.Interfaces.XCRICAP11.IGeneric)course); foreach (XCRI.Interfaces.XCRICAP11.IQualification qualification in course.Qualifications) this.Write(xmlWriter, qualification); foreach (XCRI.Interfaces.XCRICAP11.IPresentation presentation in course.Presentations) this.Write(xmlWriter, presentation); this._WriteEndElement(xmlWriter); }