tjhons
23 Jan 2012, 2:59 AM
Hi!
I want to create TreePanel with data model loaded from xml. In docs i find fine examples how to do it with simple structured xml, but not found what doing my case.
I have next nested xml data structure:
<officeGroup>
<name>office name 1</name>
<child>
<officeGroup>
<name>office name 1.1</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
</employee>
<child>
<officeGroup>
<name>office name 1.1.1</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
<person>
<displayName>name 2</displayName>
</person>
</employee>
</officeGroup>
<officeGroup>
<name>office name 1.1.2</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
<person>
<displayName>name 2</displayName>
</person>
</employee>
</officeGroup>
</child>
</child>
</officeGroup>
<officeGroup>
<name>office group 2</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
<person>
<displayName>name 2</displayName>
</person>
</employee>
</officeGroup>
One office group may have several children office groups.
What to do in this case?
I want to create TreePanel with data model loaded from xml. In docs i find fine examples how to do it with simple structured xml, but not found what doing my case.
I have next nested xml data structure:
<officeGroup>
<name>office name 1</name>
<child>
<officeGroup>
<name>office name 1.1</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
</employee>
<child>
<officeGroup>
<name>office name 1.1.1</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
<person>
<displayName>name 2</displayName>
</person>
</employee>
</officeGroup>
<officeGroup>
<name>office name 1.1.2</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
<person>
<displayName>name 2</displayName>
</person>
</employee>
</officeGroup>
</child>
</child>
</officeGroup>
<officeGroup>
<name>office group 2</name>
<employee>
<person>
<displayName>name 1</displayName>
</person>
<person>
<displayName>name 2</displayName>
</person>
</employee>
</officeGroup>
One office group may have several children office groups.
What to do in this case?