| | |
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 |
-xlint add android api applet application applications array arrays automation bank bi binary blackberry bluetooth chat class clear client code compile compiler component database development dice digit eclipse equation error event formatingtextintooltipjava fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image infinite int integer j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux list main map method mobile myregfun netbeans nonstatic notdisplaying openjavafx pearl problem program project qt recursion repositories scanner screen scrollbar server set sms sort sorting spamblocker sql sqlserver state storm string superclass swing system thread threads tree variablebinding windows xor





