colin mcculloch

Greenhorn
+ Follow
since Apr 05, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by colin mcculloch

thanks to everyone who posted here hopefully i'll be able to figure the rest out for myself. will post back again if not
17 years ago
had an ulber post here before, but luckily (all be it after several hours,) i got the problem fixed. i do however have a few more questions on the subject,

first, how do i load the xml file back into a hashmap, and
second, the xml file generated by this example comes out all in one long line rather than being nicely spaced and indented, will this affect the functionality of the program, and is it possible to correct this?
[ June 09, 2006: Message edited by: colin mcculloch ]
17 years ago
id say Edwins suggestion looks best, but could you please tell me which parts of the API i have to import to use this?
17 years ago

Originally posted by William Brogden:
In Java 1.5 the java.util.Properties class got a loadFromXML and a storeToXML method. Properties is an extension of Hashtable and implements Map.
Perhaps that will handle your problem without going to another library.
Bill



i did try this already but i had a few problems, first properties only stores String, String. my map is String, integer. id rather not have to go through converting the integers to srtings and vice versa

the second problem i had (im guessing) is with the way i implemented the code, my xml always turned out like this




Satou: i had a look at your example too, but in my code i define the hashmap:

i take it this wont make any difference to the example you posted?
17 years ago
ok the title says it all really; what i need is a method/class that will write a hashmap to an xml file in the form

<entry key="key">value</entry> or
<entry key="key" value="value" />

(im not that bothered about doctypes etc, as long as i can load the data to the hashmap when the program starts and then save the hashmap back to the file once the program has run)

i really dont have any experience with using xml in java, so any help you could give would be much appreciated
17 years ago

Originally posted by Jeroen T Wenting:

You won't find a tutorial which handholds you through the creation of an IRC client.



yeah i kinda figured that, the problem for me was going to be the GUI. im absolutely hopeless when it comes to swing. think i'll probably just make a bot instead since bots dont need GUI's XD
17 years ago
ok, i want to create an IRC client written in java. i understand the basic principals behind this type of program but i cant find any good tutorials on the subject. cold someone point me towards a good online tutorial.. or even post some useful info here

thanks
17 years ago
ok heres the problem, i have tp call a cgi script url from a java program. basically its the same url a user would enter in a webbrowser to activate the script, the only problem is that nothing i try seems to work. heres what i have so far


ive also tried putting the whole url in ie.


but that doesnt seem to work either, im at my wits end here, i really need help with this
17 years ago