User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 361,626 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,207 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 4812 | Replies: 0
Reply
Join Date: Sep 2004
Posts: 1
Reputation: Cockney is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Cockney Cockney is offline Offline
Newbie Poster

Pass XML file contents to a hash table.

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Java Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 6:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC