method Grid.LoadXML (Source 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.
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 load XML documents, previously saved using the SaveXML method. The control is emptied when the LoadXML method is called, and so the columns and items collection are emptied before loading the XML document. The LoadXML method adds a new column for each <column> tag found in the <columns> collection. Properties like Caption, HTMLCaption, Image, Visible, LevelKey, DisplayFilterButton, DisplayFilterPattern, FilterType, Width and Position are fetched for each column found in the XML document. The control fires the AddColumn event for each found column. The <items> xml element contains a collection of <item> objects. Each <item> object holds information about an item in the control, including its cells, or child items. Each item contains a collection of <cell> objects that defines the cell for each column. The Expanded attribute specifies whether an item is expanded or collapsed, and it carries the value of the ExpandItem property. 

The XML format looks like follows:

- <Content Author Component Version ...>
	- <Columns>
		  <Column Caption Position Width HTMLCaption LevelKey DisplayFilterButton DisplayFilterPatter FilterType ... /> 
		  <Column Caption Position Width HTMLCaption LevelKey DisplayFilterButton DisplayFilterPatter FilterType ... /> 
		  ...
	  </Columns>
	- <Items>
		- <Item Expanded ...>
			  <Cell Value ValueFormat Images Image ... /> 
			  <Cell Value ValueFormat Images Image ... /> 
			  ...
			- <Items>
			   - <Item Expanded ...>
			   - <Item Expanded ...>
			   ....
			  </Items>
		  </Item>
	  </Items>
  </Content>