FileOutputStream & BufferedOutputStream - problem with c

Need help with C, C++, perl, python, etc?

FileOutputStream & BufferedOutputStream - problem with c

Postby j6df » 2007-03-11 07:49

//way it not change the xml?
try {
OutputStream fout = new FileOutputStream("data.xml");
OutputStream bout = new BufferedOutputStream(fout);
OutputStreamWriter o = new OutputStreamWriter(bout);

o.write("<?xml version=\"1.0\" ");
o.write("encoding=\"UTF-8\"?>\n");
o.write("<book>\n");
o.write("<person>\n");
o.write("<first>\n");
o.write("yoni");
o.write("</first>\n");
o.write("</person>\n");
o.write("</book>\n");

o.flush();
o.close();
} catch (Exception e) {
e.printStackTrace();
}
j6df
 
Posts: 9
Joined: 2006-08-30 17:37

Postby begatelles » 2007-03-11 13:49

I'm sorry, but isn't that java code you got there?
begatelles
 
Posts: 50
Joined: 2007-01-03 12:24


Return to Programming

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable