我有以下XML文档结构。我需要将它加载到WinForms中的TreeView中,并且能够在用鼠标选择后获取特定节点的属性。
<?xml version = "1.0" encoding = "UTF-8" ?>
<siteMap>
<Niveau_1 att1 = "att1" att2 = "att2" att3="att3" >
<Niveau_2 att1 = "att1" att2 = "att2" att3="att3" >
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
</Niveau_2>
<Niveau_2 att1 = "att1" att2 = "att2" att3="att3" >
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
</Niveau_2>
<Niveau_1/>
<Niveau_1 att1 = "att1" att2 = "att2" att3="att3" >
<Niveau_2 att1 = "att1" att2 = "att2" att3="att3" >
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
</Niveau_2>
<Niveau_2 att1 = "att1" att2 = "att2" att3="att3" >
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
<Niveau_3 att1 = "att1" att2 = "att2" att3="att3" />
</Niveau_2>
<Niveau_1/>
</siteMap>