944,083 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 10658
  • Java RSS
Sep 4th, 2004
0

Pass XML file contents to a hash table.

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Cockney is offline Offline
1 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: wordcount
Next Thread in Java Forum Timeline: Need help with java prog





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC