method XMLGrid.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, an XML document object, or a custom object that supports persistence as described bellow.  
 ReturnDescription 
  BooleanA Boolen expression that specifies whether saving the XML document was ok. 

The SaveXML method saves control's content in XML format. Use the LoadXML method to load XML documents. The Name property indicates the name of the XML node being saved. The Value property indicates the value of the XML node being saved. The Image property of the Node object indicates the type of the XML node being saved. The Image property holds the type of the XML node, like listed bellow: 

The Destination's type can be one of the following:

 

xmlDestination

Description

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:

XMLGrid11.SaveXML("sample.xml")

XML Document Object

For example:

Dim xmldoc as Object
Set xmldoc = CreateObject("MSXML.DOMDocument")
XMLGrid11.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.

 


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.