Hi,

Appologies for this long post.
I have the following xml doc

<?xml version="1.0"?>
<map>
<CI name="ABC">
<recipient id="bob-sms">
<alert method="SMS" dest="+2783XXXXXX" status="" st="" et="" enable="Y"></alert>
</recipient>
<recipient id="alex-sms">
<alert method="SMS" dest="+2782XXXXXXX" status="" st="" et="" enable="Y"></alert>
</recipient>
</CI>
<CI name="DEF">
<recipient id="fred-email">
<alert method="EMAIL" dest="fred@somewhere.com" status="" st="" et="" enable="Y"></alert>
</recipient>
</CI>
</map>

I need to get this into a datastructure of some sort and I was thinking HashMap, HashMap, HashMap.

I am given a CI on the command line. Firstly I need to check if what I received on the command line exists in the xml file.

Next I need to check what recipients are associated with the existing CI and then I need to (for this exercise) print out the method and dest for each of the recipients.

So I get "myprog -ci=ABC" I want to print out:-

bob-sms
method=SMS
dest=+2783XXXXXX
ales-sms
method=SMS
dest=+2782XXXXXXX

I was thinking of keeping the xml doc into memory by using a DOM parser.. although I should probably just want to read through the xml file each time to get the relevant values..

I can post my attempt so far if needed..

Rgds
AcidHawk