•
•
•
•
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
![]() |
•
•
Join Date: Sep 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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.
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.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
- Read XML File in C/C++ (C++)
- Pass XML File as Parameter to SP and read it (Oracle)
- Multiple Table Reading From An Xml File (VB.NET)
- Conversion of CSV file to hash table (Perl)
- Displayind data in XML file using HTML (RSS, Web Services and SOAP)
- C++hash table lookin' 4 help~~ (C++)
- Reading txt file into Hash Table (C++)
- Printing a Hash Table (C++)
- compile error-chained hash table c++ (C++)
Other Threads in the Java Forum
- Previous Thread: wordcount
- Next Thread: Need help with java prog


Linear Mode