473,569 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opening the related file from a treeview

Again, I have the following xml code:
<?xml version="1.0" ?>
<course>
<globalProperti es>
<externalMetada ta>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadat a>
</globalPropertie s>
<block id="B1">
<identification >
<title>Yes/No Questions</title>
<description>Th is course has one lesson</description>
<labels>
<curricular>MOD ULE</curricular>
<developer>Me </developer>
</labels>
</identification>
<au id="A100001">
<externalMetada ta>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadat a>
<identification >
<title>What is yes/no question</title>
<description>Th is slide describes the type of the question</description>
<labels>
<curricular>A U</curricular>
<developer>Me </developer>
</labels>
</identification>
<launch>
<location>slide 1.htm</location>
</launch>
</au>
<au id="A100002">
<externalMetada ta>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadat a>
<identification >
<title>Exampl es of yes/no questions</title>
<description>Th is slide provide examples</description>
<labels>
<curricular>A U</curricular>
<developer>Me </developer>
</labels>
</identification>
<launch>
<location>slide 2.htm</location>
</launch>
</au>
<au id="A100003">
<externalMetada ta>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadat a>
<identification >
<title>Test yourself</title>
<description>Th is slide checks what you have learned</description>
<labels>
<curricular>A U</curricular>
<developer>Me </developer>
</labels>
</identification>
<launch>
<location>slide 3.htm</location>
</launch>
</au>
</block>
<block id="B2">
<identification >
<title>WH Questions</title>
<description>Th is course has one lesson</description>
<labels>
<curricular>MOD ULE</curricular>
<developer>Me </developer>
</labels>
</identification>
</block>
<block id="B3">
<identification >
<title>Other Question Types</title>
<description>Th is course has one lesson</description>
<labels>
<curricular>MOD ULE</curricular>
<developer>Me </developer>
</labels>
</identification>
</block>
</course>

Thanks to this discussion group, I am having now a tree that holds
hierarchically the titles of the MODULEs and the AUs. For each au element, I
want to open the related file that is defined under the nodes launch/location
in the context of the subject.
I was trying:
XmlDocument doc = new XmlDocument();
doc.Load("Sampl e.xml");
foreach(XmlNode fnode in doc.SelectNodes (".//launch/location"))
{
fileName1 = fnode.InnerText ;
}

OpenFile myOpenFile = new OpenFile();
myOpenFile.Open ElemFile(fileNa me1, doc);

While OpenFile is external function. This opens me each time the location
"slide3.htm ", doesn't metter on which au title I click.

What can be the reason and how can I get the related file each time (i.e,
for the title: "What is yes/no question" I want to get "slide1.htm ", for the
title: "Examples of yes/no questions" I want to get "slide2.htm " etc...

Thanks a lot
May 27 '06 #1
0 1319

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

Similar topics

14
11039
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin =...
3
5570
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge document in Word; 2. opens the document and runs the merge process for the new data. I have managed to write the code to perform step 1 ok, but I'm...
0
1142
by: ice_tweety | last post by:
Hallo, i'm working on an mask with a treeview. This Tree has to show the status of a node in its Checkboxes. This status will be saved in a table. I need to have the status' from the table back in the checkboxes again on the next opening of the mask. That doesn't work. But when i run the function after the opening of the mask (on...
1
1956
by: Lanny McDonald | last post by:
I have built a treeview that looks something like: Root .....FolderLevel1a .........FolderLevel2a
6
1709
by: Alan Silver | last post by:
Hello, I want to show a treeview display of the contents of a sitemap file on another web site, chosen according to the currently logged on user. I know at run time the path to the sitemap file, but this cannot be determined at design time as it depends who logs in. Can I do this? I can't see how without writing my own provider, which...
0
1145
by: Christian Rühl | last post by:
Good Morning, I have generated a TreeView from a DOM. Now I want to set the checkboxes according to an ini file I've written. The ini file looks like this: .... Dsr=1 version=1 customer_control=0
4
2339
by: amit.atray | last post by:
Hi, I am trying to open an ISAM file with isopen call. But I am getting error with iserror set to 111. I tried to check 111 error code ... 111 ENOREC Action: No record could be found that contained the requested value in the specified position.
0
1236
by: Wudi008 | last post by:
Hi, I am using C#, I have a treeView in my windows.form , I want to give checkboxes for some nodes in the treeView but not all of them. If i do treeView.checkbox = true, all the nodes would have checkboxes, but i only want certain nodes to have checkbox. Is there any way to do that? Thanks, your help would be greatly appreciated.
1
9920
by: johnnypung | last post by:
I have a treeview opening a contextMenuStrip on right click. However the right click would not select the node that it right clicks on. How should I make it so the right click will select the node, and open the contextMenuStrip on that node? I tried this: private void treeView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs...
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.