This is a migrated thread and some comments may be shown as answers.

How to bind xml to treeview

1 Answer 90 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alpa
Top achievements
Rank 1
Alpa asked on 20 Aug 2011, 07:43 AM
Hi Team,

You rock.

Please help me too....
I  have a string property which has data in below format 

<MyData xmlns=http://schemas.microsoft.com/win/2004/>
<Tournament>
<Venue Name='Delhi' id='{123-345-567}' 
Duration='15 Days'/>
<SportID Participants='16384'>1111</SportID>
<Title>Football</Title>
<Level>Semifinal</Level>
<RedCards>0</RedCards>
<YellowCard>0</YellowCard>
<GreenCard>5</GreenCard>
<Duration SystemTime='2011-08-02'/>
<Sponser/>
<Refree Name='Karlos' Experience='2 Years'/>
<Security/>
</Tournament>


<TournamentData>
<Data Name='param1'>200 Teams</Data>
<Data Name='param2'>running</Data>
<XYZ>57</XYZ>
</TournamentData>


</MyData>

I want to display this data in radtreeview with proper parent child relation ship.

Please note that i am using MVVM pattern.

Any help would be highly appreciated.

Thanks in advance.



1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 24 Aug 2011, 01:41 PM
Hello Alpa,

 Please just use the approach demonstrated in this documentation article. It should be useful in this scenario. Do not hesitate to ask if you need assistance in the implementation.

Kind regards,
Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TreeView
Asked by
Alpa
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or