473,387 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem selecting child nodes

Hi all:
I am building a navigation menu using telerik's rad treeview

I am able to build the outer menu but not the children. How do I select the
child nodes (item) from within the loop?

Any help would be greatly appreciated!!

Dim node As XmlNode
For Each node In xmlDoc.SelectNodes("/configuration/groups/group[@groupid= "
& GroupID & "]/menus/menu[@value = 1]")
Dim menuname As String = node.Attributes("menuname").Value
Dim treeNode As New RadTreeNode(node.Attributes("menuname").Value)
Next node
rtvMenu.Nodes.Add(treeNode)

This is my xml structure:

<configuration>
<groups>
<group groupid="1" templateid="1">
<groupname>Primary French Immersion</groupname>
<menus>
<menu menuid="1" value="1" menuname="Resources">
<item name="Preparation and Planning" menuid="4" value="1" />
<item name="Parking Arrangments" menuid="5" value="0" />
<item name="Agendas" menuid="6" value="1" />
</menu>
<menu menuid="2" value="0" menuname="Communications">
<item name="Discussion Forum" menuid="1" value="0" />
<item name="Eluminate Live" menuid="2" value="0" />
</menu>
<menu menuid="10" value="1" menuname="Professional Development">
<item name="Course Specific" menuid="11" value="0" />
<item name="In-Service Materials" menuid="12" value="1" />
</menu>
</menus>
</group>
<group groupid="3" templateid="3">
<groupname>Core French</groupname>
<menus>
<menu menuid="1" value="0" menuname="Resources">
<item name="Preparation and Planning" menuid="4" value="0" />
<item name="Parking Arrangments" menuid="5" value="0" />
<item name="Agendas" menuid="6" value="0" />
</menu>
<menu menuid="2" value="0" menuname="Communications">
<item name="Discussion Forum" menuid="1" value="0" />
<item name="Eluminate Live" menuid="2" value="0" />
</menu>
<menu menuid="10" value="1" menuname="Professional Development">
<item name="Course Specific" menuid="11" value="1" />
<item name="In-Service Materials" menuid="12" value="0" />
</menu>
</menus>
</group>
</groups>
</configuration>
Nov 12 '05 #1
1 1557
Nancy Shelley wrote:
I am building a navigation menu using telerik's rad treeview

I am able to build the outer menu but not the children. How do I select the
child nodes (item) from within the loop?


The same way - using SelectNodes() or SelectSingleNode() methods with
relative to current node XPath expressions:

node.SelectNodes("item")
--
Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Iain Bishop | last post by:
I'm trying to model objects for the following problem: A building site contains assemblies, each of which can contain other assemblies and/or materials. I have modelled this using a Site...
9
by: Tjerk Wolterink | last post by:
Hello, suppose i have a dom like this: <a> - <b> - <b> - <d> - </b> - <c>
3
by: rob.guitar.rob | last post by:
Hello, My last few posts have been revolving aroung the same problem, and I still cant solve it and I would be really appreciate if anyone could spot a problem. a section of my XML goes like...
2
by: Saurabh Sharma | last post by:
Hi, I am using Dom Parsing in Xml. I am the parent node and it has many children and each children has many children. I want to select children with a given name . Is there any method by which we...
2
by: Marc Jennings | last post by:
Hi there, I have been given a rather poor schema for an XML file in the following format : ><item> > <key>ProductCode</key> > <value>1234-5678</value> > <key>Description</key> >...
7
by: Metal Rabbit | last post by:
Hi guys I'm needing to create a fairly complex TreeView, but am faltering on a very basic step (as you will gather, I'm new-ish to .net). Simplified, I can't get the creation of two nodes...
2
by: Tymbow | last post by:
I'm building a web application that is analogous to the Windows XP file explorer in function. The left column contains a TreeView, and the right column a DataGrid populated by selecting TreeView...
1
by: renfrochris | last post by:
I'm having difficulty finding the correct syntax that will allow me to select a group of invoices based on the total of an amount column located in its line items. Below are simplified examples of...
1
by: jdhcards | last post by:
Hello, I've been banging my head against a problem all day without a solution, and I'm hoping you all can help. I've got a piece of XML that defines a set of elements in a flat list. Each of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.