| | |
Pass XML file contents to a hash table.
![]() |
•
•
Join Date: Sep 2004
Posts: 1
Reputation:
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.
![]() |
Similar Threads
- How to read a file using hash table (C++)
- xml deserilization (Java)
- How to pass a xml file taking "uri" as initializer from one class to another class? (C#)
- Reading txt file into Hash Table (C++)
- problem with xml file (C#)
- Help with finding a good use for a hash table in my program.... (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)
Other Threads in the Java Forum
- Previous Thread: wordcount
- Next Thread: Need help with java prog
| Thread Tools | Search this Thread |
account android applet application apps array automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card class classes client code collision columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error eventlistener exception expand fractal free game givemetehcodez graphics gui guidancer homework html ide image inheritance integer integration intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield jtree julia linux loop method midlethttpconnection migrate mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source oracle plazmic print problem program property ria scanner server set sharepoint smart sms smsspam sourcelabs splash sql sqlite subclass support swing testautomation textfield threads tree trolltech unlimited utility windows





