method ChartView.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.
  • exXMLIgnoreRoot (0x0008, 8), Ignores root definition. Defined by <Root> tag.
  • exXMLIgnoreFrames (0x0010, 16), Ignores frames settings. Defined by <Frames> 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 ( MSXML.DOMDocument, XML DOM Document ) parser to fetch the control's data from XML documents, previously saved using the SaveXML method. The control is emptied when the LoadXML method is called, and so the nodes collection is emptied before loading a new XML document. The <root> element holds information about the root node of the control, including its child nodes stored in <node> elements. Properties like Caption, Key, Image, ImageAlignment, Expanded or Left for assistant nodes, are saved for each node. The <assistants> element contains a collection of <assistant> elements that holds information about an assistant node.

The XML format looks like follows:

- <Content Author Component Version>
	- <Root Key Caption Image ImageAlignment Expanded>
		- <Node Key Caption Image ImageAlignment Expanded>
			- <Node Key Caption Image ImageAlignment Expanded/>
			- <Node Key Caption Image ImageAlignment Expanded>
				- <Node Key Caption Image ImageAlignment Expanded/>
				- <Node Key Caption Image ImageAlignment Expanded>
				  </Node>
				....
				- <Assistants>
					  <Assistant Caption Left Image ImageAlignment /> 
				  </Assistants>
			  </Node>
			....
			- <Assistants>
				  <Assistant Caption Left Image ImageAlignment /> 
			  </Assistants>
		  </Node>
		- <Assistants>
			  <Assistant Caption Left Image ImageAlignment /> 
		  </Assistants>
	  </Root>
</Content>