PDA

View Full Version : help with this code about tree menu ??


santral
01-16-2008, 02:06 PM
I have a tree menu which gets information from xml.

in xml :

<dr>
<rsmler>
<grup>
<tree>1.1</tree>
<rsm>
<yol>1-2-1.jpg</yol>
<isim>My picture</isim>
</rsm>
</grup>

<grup>
<tree>1.1</tree>
<rsm>
<yol>1-2-1.jpg</yol>
<isim>My picture</isim>
</rsm>
</grup>

...etc
</rsmler>
</dr>




when I click node 1.1 in tree menu ,I want to get grup1 information or when clicked 1.x get the information of grup which has 1.x in <tree>1.x</tree>

I couldnt solve :huh

my not working codes are :



sSelected = Tree.GetSelectedNode( "Tree1");
nSelected = String.ToNumber(sSelected);
maxgrup = XML.Count("dr/rsmler", "grup");

for a = 1,maxgrup do
pathw = "dr/rsmler/grup:"..a
subtree = XML.GetValue(pathw.. "/tree");
subt = String.ToNumber(subtree);
for nSelected = subt,subt do
maxresim = XML.Count(""..pathw, "rsm");
for b = 1,maxresim do
rsm = pathw.."/rsm:"..b
rsmyol = XML.GetValue(rsm.."/yol");

Image.Load("sut"..b, "AutoPlay\\MM_Rsm\\"..rsmyol);
end
end
end

pls help ...