Pass XML file contents to a hash table.

Reply

Join Date: Sep 2004
Posts: 1
Reputation: Cockney is an unknown quantity at this point 
Solved Threads: 0
Cockney Cockney is offline Offline
Newbie Poster

Pass XML file contents to a hash table.

 
0
  #1
Sep 4th, 2004
Hi all

new in this forum

I'm facing a problem. I need to pass the contents of an XML file to a hash table. The problem is that for each key i have multiple values.

i.e.
<?xml version="1.0" encoding="utf-8" ?>
<Menu>
<File>
<EN>...</EN>
<FR>...</FR>
<IT>...</IT>
</File>
<ShowHide>
<EN>...</EN>
<FR>...</FR>
<IT>...</IT>
</ShowHide>
</Menu>

So far I have managed to read the xml file and and printout the selected key and value.
using something like:
getString("File","EN")

But now i want to place all the elements of the xml file to a hash table so that the programme reads the file faster (it's a big file).

Any ideas?

I'm guessing that i have to do something like:

Hashtable mytable = new Hashtable();
mytable.put(key,value);


but how do i separate each same key for a different value (EN,FR,IT) ?

Thanks in advance for your reply

P.S. I'm not a guru in this , so keep your answers as simple as possible, cheers.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC