method XMLGrid.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 

  • string that indicates the file name, a URL, or a XML supplied string,
  • IStream,
  • SAFEARRAY,
  • 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. The control is emptied when the LoadXML method is called. During loading, the control fires the AddNode event for each XML node added to the control. For instance, this way, you can assign an editor for each node, when the AddNode event occurs. Use the Editor property to assign a predefined editor to a node. Use the SaveXML method to save the control's content to a specified location. The AllowDuplicateEntries property returns or sets a value that specifies whether the control supports nodes with the same key ( duplicates ).

The Name property indicates the name of the XML node being loaded. The Value property indicates the value of the XML node being loaded. The Image property of the Node object indicates the type of the XML node being loaded. The Image property holds the type of the XML node, like listed bellow: 

Use the Images method to add images to the control, so each type of element in your XML document, has a graphic representation. So, the first icon in the Images collection indicates the NODE_ELEMENT type, the second icon in the Images collection indicates the NODE_ATTRIBUTE type, and so on.