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