method Schedule.SaveXML (Destination as Variant)
Saves the control's content as XML document to the specified location, using the MSXML parser.

TypeDescription
Destination as Variant This object can represent a file name, reference to a string member, an XML document object, or a custom object that supports persistence as follows:
  • String - Specifies the file name. Note that this must be a file name, rather than a URL. The file is created if necessary and the contents are entirely replaced with the contents of the saved document. For example:

    Schedule1.SaveXML("sample.xml")

  • Reference to a String member - Saves the control's content to the string member. Note that the string member must be empty, before calling the SaveXML method. For example:

    Dim s As String
    Schedule1.SaveXML s

    In VB.NET for /NET assembly, you should call such as :

    Dim s As String = String.Empty
    Exschedule1.SaveXML(s)

    In C# for /NET assembly, you should call such as :

    string s = string.Empty;
    exschedule1.SaveXML(ref s); 

  • XML Document Object. For example:

    Dim xmldoc as Object
    Set xmldoc = CreateObject("MSXML.DOMDocument")
    Schedule1.SaveXML(xmldoc)

  • Custom object supporting persistence - Any other custom COM object that supports QueryInterface for IStream, IPersistStream, or IPersistStreamInit can also be provided here and the document will be saved accordingly. In the IStream case, the IStream::Write method will be called as it saves the document; in the IPersistStream case, IPersistStream::Load will be called with an IStream that supports the Read, Seek, and Stat methods.

ReturnDescription
BooleanA Boolen expression that specifies whether saving the XML document was ok.
The SaveXML method uses the MSXML ( MSXML.DOMDocument, XML DOM Document ) parser to save the control's data in XML documents. The LoadXML method loads XML documents being created with SaveXML method. The Copy, CopyTo methods copies the control's content in EMF format.

The XML format looks like follows:

- <Content Author Component Version>
  <DateFormat Separator Short Long /> 
  <TimeFormat Separator Format AM PM /> 
  <NumberFormat Decimal /> 
- <Calendar WeekDays MonthNames AMPM FirstWeekDay NonworkingDays ShortDateFormat LongDateFormat ShortTimeFormat LongTimeFormat GroupHighlightEven ShowHighlightEvent DisableZoneFormat MinDate MaxDate ShowNonMonthDays Date SingleSel HideSel ...>
	- <Selection>
  		<Date Value .../> 
	  </Selection>
	  <HighlightEvent Bold Italic Underline StrikeOut FontSize .../> 
  </Calendar>
- <TimeScales DayStartTime DayEndTime>
	  <TimeScale TimeZone AlignLeft MinWidth MaxWidth Width AllowResize MajorRuler MajorLabel MajorPlainText MinorRuler MinorLabel MinorPlainText Visible Caption CaptionAlign ToolTip UserData MinorLabelColor .../> 
  </TimeScales>
- <Groups ApplyGroupingColors DisplayGroupingButton GroupHighlightEvent ShowGroupingEvents>
	- <Group ID Visible Caption Title ToolTip Alignment UserData>
		  <CalendarHighlightEvent Bold Italic Underline StrikeOut FontSize ... /> 
		  <ScheduleHighlightEvent Bold Italic Underline StrikeOut FontSize ... /> 
	  </Group>
  </Groups>
- <NonworkingPatterns>
	<NonworkingPattern ID PatternType PatternColor PatternFrameColor .../> 
  </NonworkingPatterns>
- <NonworkingTimes ShowNonworkingTime>
  	<NonworkingTime Expression StartTime EndTime IDNonworkingPattern .../> 
  </NonworkingTimes>
- <MarkZones>
	  <MarkZone Key Start End ShortLabel LongLabel GroupID PatternType PatternColor PatternFrameColor ... /> 
  </MarkZones>
- <MarkTimes ShowMarkTime>
	  <MarkTime Key Time Line TimeScaleLine LineColor TimeScaleLineColor Label TimeScaleLabel LabelAlign TimeScaleLabelAlign Movable StatusEventBackColor UserData ... /> 
  </MarkTimes>
- <Pictures ShowEventPictures>
  	<Picture Key Content Width Height ShowHandCursor Enabled ... /> 
  </Pictures>
  <Icons Content/> 
- <Events HeaderDayLongLabel HeaderDayShortLabel CreateEventLabel CreateEventLabelAlign UpdateEventsLabel UpdateEventsLabelAlign DefaultEventLongLabel DefaultEventTooltip DefaultEventPaddingLeft DefaultEventPaddingTop DefaultEventPaddingRight DefaultEventPaddingBottom ...>
	  <Event Start End GroupID Selectable ShowStatus ShortLabel LongLabel LabelAlign ExtraLabelAlign Pictures ... /> 
  </Events>
  </Content>