JSTL and XML
Hi, I don't know if i can post this problem/question on this forum, so apologies if i'm wrong.
I was wondering if anyone can help me with a problem that I have or at least advise me on the direction. I have an XML file that essentially looks something like this:
<display-groups>
<group name="Date (Platform)">
<field-name name="Start" pi-fieldname="Start" />
<field-name name="In Service" />
<field-name name="InitialGate" />
<field-name name="MainGate" />
<field-name name="Retired" />
</group>
<group name="Date (Programmes, Systems and Sub-System)">
<field-name name="Start Date Range Blocks -5yrs blocks" />
<field-name name="Initial Gate - Range Blocks - 5yr blocks" />
<field-name name="Main Gate - Range Blocks -5yrs blocks" />
<field-name name="In Service - Range Blocks -5yrs blocks" />
</group>
</display-groups>
I then call this XML file in the JSP page using JSTL. Using JSTL i create a dropdown list from <group>. The idea is to create a list of headers that are dependent on the group name. that is to say if I selected Date (Platform) the headers that should be displayed on the JSP are:
Start
In Service
Initial Gate
Main Gate
Retired
Any help would be highly appreciated.
Thanks
[1749 byte] By [
amin1977] at [2007-9-30 21:05:21]

Hi,
I can parse the XML document and full values to create the dropdown box, my problem/ query is that what's the best way to create a set of headers depending on the value selected from the dropdown box. e.g.
Date (platform) [should display the following children nodes of parent Date(platform)
--
//these values are held in the xml file
Start
In Service
Initial Gate
Main Gate
Retired
and so on....
Thanks
I still don't understand what you mean by a header.
Is it something that is included at the top of the NEXT page. ie, the user makes a selection from the drop down and submits to the next page. Depending on the option chosen, the next page will look different.
Is it part of a Table on the same page? The user makes a selection from the drop down, and the title of a table shown on that page changes.
Is it some text between one of the html header tags? When the user makes a selection, there is a second part of the page, with <h1>Some Text</h1> and you want to change the value between <h1><><h1>
Is it some JSP that is included in the page, so when the user changes their selection, a different JSP is include on the same page?
If the problem isn't reading the XML, and it isn't making a select box, and the problem IS changing the header, we have to know what you mean by a header.