method Pivot.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 follows:
  • 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:

    Pivot1.SaveXML("sample.xml")

  • XML Document Object. For example:

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

ReturnDescription
BooleanA Boolen expression that specifies whether saving the XML document was ok.
The SaveXML method uses the MSXML ( MSXML.DOMDocument, XML DOM Document ) parser to save the control's data in XML documents. The LoadXML method loads XML documents being created with SaveXML method. The SaveXML method saves each column in <column> elements under the <columns> collection. The <items> xml element saves a collection of <item> objects. Each <item> object holds information about an item in the control, including its cells or child items. Each item saves a collection of <cell> objects that defines the cell for each column. 

The control saves the control's data in XML format  like follows:

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