Hello,
When I export a tree to an XML file as follows :
var
tmp : TTreeData;
begin
Tree1.NoOwnerShapes := False;
tmp := TTreeDataXML.Create(Tree1);
tmp.SaveToFile('c:\text.xml');
end;
The XML does not show the sub nodes, alle the nodes are shown on the same level.
How can I export en import a Tree with the subnode information
eg :
Main
--Sub1
----Subsub11
----Subsub12
--Sub 2
----Subsub21
----Subsub22
is exported as
<tree>
-<node>Sub1</node>
-<node>Subsub11</node>
-<node>Subsub12</node>
-<node>Sub 2</node>
-<node>Subsub21</node>
-<node>Subsub22</node>
</tree>
in staid of
<tree>
-<node>
---Title= "Sub1"
---<subnodes>
-----<subnode>Subsub11</subnode>
-----<subnode>Subsub12</subnode>
---</subnodes>
-</node>
-<node>Sub 2
--<subnodes>
----<subnode>Subsub21</subnode>
----<subnode>Subsub22</subnode>
----</subnodes>
--</node>
</tree>
Thanks,
Marcel
Export to XML file does not show sub nodes.
-
- Newbie
- Posts: 3
- Joined: Wed Mar 08, 2006 12:00 am
Hi,
Which version are you using? The latest shipped with teechart v8 corrected this issue. A tree is now exported as:
Setting the compact property to true, it is exported as
Regards,
tom
Which version are you using? The latest shipped with teechart v8 corrected this issue. A tree is now exported as:
Code: Select all
<?xml version="1.0" ?>
<tree>
<node name="TreeNodeShape1" class="TTreeNodeShape">Root 1
<node name="TreeNodeShape2" class="TTreeNodeShape">Child 1
<node name="TreeNodeShape5" class="TTreeNodeShape">Child 1</node>
<node name="TreeNodeShape6" class="TTreeNodeShape">Child 2</node>
</node>
<node name="TreeNodeShape3" class="TTreeNodeShape">Child 2</node>
<node name="TreeNodeShape4" class="TTreeNodeShape">Child 3</node>
</node>
</tree>
Code: Select all
<?xml version="1.0" ?><tree><node name="TreeNodeShape1" class="TTreeNodeShape">Root 1<node name="TreeNodeShape2" class="TTreeNodeShape">Child 1<node name="TreeNodeShape5" class="TTreeNodeShape">Child 1</node><node name="TreeNodeShape6" class="TTreeNodeShape">Child 2</node></node><node name="TreeNodeShape3" class="TTreeNodeShape">Child 2</node><node name="TreeNodeShape4" class="TTreeNodeShape">Child 3</node></node></tree>
tom
-
- Newbie
- Posts: 3
- Joined: Wed Mar 08, 2006 12:00 am