Results 1 to 1 of 1
- 03-20-2009, 11:44 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 15
- Rep Power
- 0
hey everyone a quick buffered writter question
I am writting an XML parser and am trying to add tabs to the .write() function of the buffered writter what is the best way of doing this?
here is my code:
Java Code:public void writeXML() { try { File fileToWrite = new File( "C:\\Documents and Settings\\userName\\Desktop\\new_games.xml"); FileWriter fileWriter = new FileWriter(fileToWrite); BufferedWriter writer = new BufferedWriter(fileWriter); for (int i = 0; i < gameList.size(); i++) { Game game = gameList.get(i); writer.write("'<?xml version="+" 1.0'"+"' encoding="+"ISO-8859-1'"+"?> "); writer.write("[COLOR="Red"]NEED TABS HERE !!<[/COLOR]gamelist>"); writer.write(game.getGameName()); writer.newLine(); writer.newLine(); writer.newLine(); writer.flush(); } } catch (Exception e) { e.printStackTrace(); } }Last edited by xbox_nutter; 03-20-2009 at 11:49 AM.
Similar Threads
-
One last quick question
By jigglywiggly in forum New To JavaReplies: 7Last Post: 01-26-2009, 08:53 AM -
Quick Question
By Graeme in forum New To JavaReplies: 4Last Post: 01-08-2009, 08:01 PM -
Quick Question
By Spenc in forum New To JavaReplies: 3Last Post: 09-22-2008, 02:26 PM -
Quick question about sorting
By nbd223 in forum New To JavaReplies: 10Last Post: 04-28-2008, 09:11 AM -
Quick Stupid Question
By bluekswing in forum New To JavaReplies: 7Last Post: 01-08-2008, 06:35 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks