I have the following xml:
<?xml version="1.0" ?>
<course>
<globalProperties>
<externalMetadata>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadata>
</globalProperties>
<block id="B1">
<identification>
<title>Yes/No Questions</title>
<description>This course has one lesson</description>
<labels>
<curricular>MODULE</curricular>
<developer>Me</developer>
</labels>
</identification>
<au id="A100001">
<externalMetadata>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadata>
<identification>
<title>What is yes/no question</title>
<description>This slide describes the type of the question</description>
<labels>
<curricular>AU</curricular>
<developer>Me</developer>
</labels>
</identification>
<launch>
<location>slide1.htm</location>
</launch>
</au>
<au id="A100002">
<externalMetadata>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadata>
<identification>
<title>Examples of yes/no questions</title>
<description>This slide provide examples</description>
<labels>
<curricular>AU</curricular>
<developer>Me</developer>
</labels>
</identification>
<launch>
<location>slide2.htm</location>
</launch>
</au>
<au id="A100003">
<externalMetadata>
<source>ADL</source>
<model>ADL SCORM 1.0</model>
</externalMetadata>
<identification>
<title>Test yourself</title>
<description>This slide checks what you have learned</description>
<labels>
<curricular>AU</curricular>
<developer>Me</developer>
</labels>
</identification>
<launch>
<location>slide3.htm</location>
</launch>
</au>
</block>
<block id="B2">
<identification>
<title>WH Questions</title>
<description>This course has one lesson</description>
<labels>
<curricular>MODULE</curricular>
<developer>Me</developer>
</labels>
</identification>
</block>
<block id="B3">
<identification>
<title>Other Question Types</title>
<description>This course has one lesson</description>
<labels>
<curricular>MODULE</curricular>
<developer>Me</developer>
</labels>
</identification>
</block>
</course>
I'm trying to build a treeview that will show hierarchically the MODULEs and
the AUs. In the text of the tree nodes I want to show the title od each
identification. to get the Modules title I was trying the following xpath:
"//identification/labels[curricular='MODULE']/..title"
When running winform in c#, this expression returns me the error:
//identification/labels[curricular='MODULE']/..title has an invalid token.
Just for the test, if I try to get the developer - which is at the same
level of the label: "//identification/labels[curricular='MODULE']/developer"
- it works - I get the titles as required. How can I get the title which is
one level higher then the one I'm at?
Thanks a lot