method Schedule.LoadXML (Source as Variant, [Flags as Variant])
Loads an XML document from the specified location, using MSXML parser.

TypeDescription
Source as Variant An indicator of the object that specifies the source for the XML document. The object can represent a file name, a URL, an IStream, a SAFEARRAY, or an IXMLDOMDocument.
Flags as Variant Specifies a numeric expression that defines which parts of the XML file should be ignored when loading data. Multiple flags can be combined using bitwise OR (|). 

The flags you can use are (numeric value only) : 

  • exXMLIgnoreDateFormat (0x0001, 1), Ignores the file's DateFormat setting. Defined by <DateFormat> tag.
  • exXMLIgnoreTimeFormat (0x0002, 2), Ignores the file's TimeFormat setting. Defined by <TimeFormat> tag.
  • exXMLIgnoreNumberFormat (0x0004, 4), Ignores the file's NumberFormat setting. Defined by <NumberFormat> tag.
  • exXMLIgnoreCalendar (0x0008, 8), Ignores calendar definitions. Defined by <calendar> tag.
  • exXMLIgnoreTimeScales (0x0010, 16), Ignores timescale settings. Defined by <TimeScales> tag.
  • exXMLIgnoreGroups (0x0020, 32), Ignores group definitions. Defined by <Groups> tag.
  • exXMLIgnoreNonworkingPatterns (0x0040, 64), Ignores nonworking day patterns. Defined by <NonWorkingPatterns> tag.
  • exXMLIgnoreNonworkingTimes (0x0080, 128), Ignores nonworking time intervals. Defined by <NonWorkingTimes> tag.
  • exXMLIgnoreMarkZones (0x0100, 256), Ignores mark zones. Defined by <MarkZones> tag.
  • exXMLIgnoreMarkTimes (0x0200, 512), Ignores mark times. Defined by <MarkTimes> tag.
  • exXMLIgnorePictures (0x0400, 1024), Ignores pictures included in the XML. Defined by <Pictures> tag.
  • exXMLIgnoreIcons (0x0800, 2048), Ignores icons included in the XML. Defined by <Icons> tag.
  • exXMLIgnoreEvents (0x1000, 4096), Ignores events. Defined by <Events> tag.

For example, LoadXML(..., 7) loads the data but ignores the file’s DateFormat, TimeFormat, and NumberFormat. You can use this approach when saving the file locally, as the date, time, and number formats will remain unchanged.

ReturnDescription
BooleanA boolean expression that specifies whether the XML document is loaded without errors. If an error occurs, the method retrieves a description of the error occurred. 
The LoadXML method uses the MSXML parser (MSXML.DOMDocument, XML DOM Document) to load XML documents that were previously saved with the SaveXML method. Before calling LoadXML, you can use the ClearAll method to empty the control's content. When LoadXML runs, it triggers the AddEvent event for each loaded event. Note that LoadXML does not clear the existing Events collection. This behavior allows you to load multiple XML files sequentially, adding new events to the collection each time. You 

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>