Carlos1815
Programmer
Hello!
I have a question; how do I get the content from a tag's element? I have an XML file with the following structure:
What I need to do is get Name from ("Storyboard")[0], which, if my counting is correct, happens to be in this case "1.1 Course name". I seem to be closing in on it, but I ran into a wall and I can't figure out the syntax for grabbing that element. I need to be able to grab that element name, strip off the preceding number.number (I think I know how to do that with a substring function), and display it as a link on a main menu for a student to click on. I want to be able to dynamically grab all the course and lesson names and display them on the main menu rather than hard code each of them into the main menu HTML file. I already have the links set up, but they are all hard coded and like I said above, I want to be able to automatically populate the main menu from the XML using code.
Any help would be appreciated!
Thanks in advance!
Carlos
I have a question; how do I get the content from a tag's element? I have an XML file with the following structure:
Code:
<Content>
<Mapped>
<Storyboard ID="11111" Name="1.1 Course name">
<more xml stuff>32</more xml stuff>
<more xml stuff>Folder</more xml stuff>
<Storyboard ID="11112" Name="1.1.1 Lesson name">
<more xml stuff>32</more xml stuff>
<more xml stuff>Folder</more xml stuff>
<Storyboard ID="11113" Name="1.1.1.0 Topic name">
</Storyboard>
</Storyboard>
</Storyboard>
</Mapped>
</Content>
What I need to do is get Name from ("Storyboard")[0], which, if my counting is correct, happens to be in this case "1.1 Course name". I seem to be closing in on it, but I ran into a wall and I can't figure out the syntax for grabbing that element. I need to be able to grab that element name, strip off the preceding number.number (I think I know how to do that with a substring function), and display it as a link on a main menu for a student to click on. I want to be able to dynamically grab all the course and lesson names and display them on the main menu rather than hard code each of them into the main menu HTML file. I already have the links set up, but they are all hard coded and like I said above, I want to be able to automatically populate the main menu from the XML using code.
Any help would be appreciated!
Thanks in advance!
Carlos