Type | Description | |||
Destination as Variant |
This object can represent a file name, reference to a string member, an XML document object, or a custom
object that supports persistence as follows:
|
Return | Description | |||
Boolean | A 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. Properties like Caption, HTMLCaption, Image, Visible, LevelKey, DisplayFilterButton, DisplayFilterPattern, FilterType, Width and Position are saved for each column in the control. The <items> xml element saves a collection of <item> objects. Each <item> object holds information about an item in the control, including its cells, child items or bars. Each item saves a collection of <cell> objects that defines the cell for each column. The <bars> element saves a collection of <bar> each one is associated with the bars in the item. The Expanded attribute specifies whether an item is expanded or collapsed, and it carries the value of the ExpandItem property. The <chart> element saves data related to the chart data of the control. For instance, it includes the collection of levels being displayed in the chart, the first visible date, links and groups of bars. The <levels> element holds a collection of <level> objects each one being associated with an level in the chart area. The <links> element holds a collection of <link> objects each one indicating a link between two bars in the chart. The <groups> element holds a collection of <group> objects that indicates the bars that are grouped in the chart.
The control saves the control's data in XML format like follows:
- <Content Author Component Version ...> - <Chart FirstVisibleDate ...> - <Levels> <Level Label Unit Count /> <Level Label Unit Count /> ... </Levels> - <Links> <Link Key StartItem StartBar EndItem EndBar Visible StartPos EndPos Color Style Width ShowDir Text ... /> <Link Key StartItem StartBar EndItem EndBar Visible StartPos EndPos Color Style Width ShowDir Text ... /> ... </Links> - <Groups> <Group ItemA KeyA StartA ItemB KeyB StartB /> <Group ItemA KeyA StartA ItemB KeyB StartB /> ... </Groups> </Chart> - <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 ... /> ... - <Bars> <Bar Name Start End Caption HAlignCaption VAlignCaption Key ... /> <Bar Name Start End Caption HAlignCaption VAlignCaption Key ... /> ... </Bars> - <Items> - <Item Expanded ...> - <Item Expanded ...> .... </Items> </Item> </Items> </Content>The following C# sample saves the control's data to testing.xml file:
object xml = "c:\\testing.xml"; axG2antt1.SaveXML(ref xml);
The following VB.NET sample saves the control's data to testing.xml file:
Dim xml As String = "testing.xml" AxG2antt1.SaveXML(xml)