troubleshooting Question

XML/AJAX select box and results output

Avatar of Lady_M
Lady_MFlag for United Kingdom of Great Britain and Northern Ireland asked on
JavaScriptXMLWeb Applications
13 Comments6 Solutions283 ViewsLast Modified:
Hi
I am trying to write my first XML app and am having quite a bit of trouble.  I'm not asking people to write my code for me here but I'd really appreciate it if you could at least point me in the right direction and tell me what approach I have to take please.  I have a feeling that Ajax would be the best method.
Thank you.

*******************************************************************************

So what I'd like to do is populate a select box with my xml list of CENTRES, when the user chooses one I would like to output the selected CENTRE and under it the relevant SUBCENTRE/S for it in a list so it would look something like this:

CENTRE:  Accounts Payable:

> Buying
       Here is some info
       Here is the deadline date

> Selling
      Here is some info
      Here is the deadline date

So two questions really:
1) How do I populate my select box with the CENTRES?
2) How to I output the results from the choice?

******************************************************************************

So this is my xml file right?  But I don't really know if it's right or where to go from here.  


<?xml version='1.0'?>
<!DOCTYPE CENTRE [
<!ELEMENT CENTRE (SUBCENTRE+)>
<!ELEMENT SUBCENTRE (NAME,DEADLINE)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT DEADLINE (#PCDATA)>
]>


<CENTRES>
<CENTRE>
      <NAME>CENTRE 1</NAME>
       <SUBCENTRES>
             <SUBCENTRE>
                   <TITLE>SubCENTRE 1a</TITLE>
                   <DEADLINE>1st Jan</DEADLINE>
             </SUBCENTRE>
             <SUBCENTRE>
                   <TITLE>SubCENTRE 1b</TITLE>
                   <DEADLINE>1st March</DEADLINE>
             </SUBCENTRE>
       </SUBCENTRES>
 </CENTRE>

<CENTRE>
      <NAME>CENTRE 2</NAME>
       <SUBCENTRES>
             <SUBCENTRE>
                   <TITLE>SubCENTRE 2a</TITLE>
                   <DEADLINE> 1st Feb</DEADLINE>
             </SUBCENTRE>
             <SUBCENTRE>
                   <TITLE>SubCENTRE 2b</TITLE>
                   <DEADLINE>3rd Nov</DEADLINE>
             </SUBCENTRE>
       </SUBCENTRES>
 </CENTRE>
 </CENTRES>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 6 Answers and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 6 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros