Visualizators > Visualizators Assembly Interfaces > IVZDataVisualizer > IVZDataVisualizer.LoadFromXml
LoadFromXml(Value: String);
Value. Visualizer parameters in XML format.
The LoadFromXml method loads XML parameters of visualizer: style and data.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. Add links to the Express, Metabase, Visualizators, and Xml system assemblies.
Before executing the example, the bubble tree looks as shown on the IVZBubbleTree interface description page. Get style parameters in the XML format for this tree and change the color of labels that are outside the bubbles:
Sub UserProc;
Var
Metabase: IMetabase;
EaxAnalyzer: IEaxAnalyzer;
BubbleTree: IVZBubbleTree;
BubbleTreeXML: String;
XMLDoc: IXMLDOMDocument;
Loaded: Boolean;
Nodes: IXmlDomNodeList;
Node, NodeAttr: IXmlDomNode;
Begin
// Get the current repository
Metabase := MetabaseClass.Active;
// Get express report
EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get bubble tree parameters as XML file
BubbleTreeXML := BubbleTree.SaveToXml;
// Create a structure for changing XML
XMLDoc := New DOMDocument.Create;
Loaded := XMLDoc.loadXML(BubbleTreeXML);
If Loaded Then
// Get the Font node
Nodes := XMLDOc.getElementsByTagName("Font");
Node := Nodes.item(1);
// Find the Color attribute
NodeAttr := Node.attributes.getNamedItem("Color");
// Set other color
NodeAttr.nodeValue := "#FF404EED";
// Get changed XML
BubbleTreeXML := XMLDoc.xml;
End If;
// Set new values for bubble tree style settings from XML file
BubbleTree.LoadFromXml(BubbleTreeXML);
// Get express report
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the color of the labels that are outside the bubble is changed for blue.
See also: