[ajuda]XStream

2 respostas
xwillianss

Galera, não estou conseguindo criar arquivos XML com o XStream. O problema é que o Xstream só cria o arquivo na memória . Eu quero que ele crie o arquivo no HD(que também é uma memória, mas eu quero que o arquivo fique visível).

2 Respostas

guilhermevh
Da uma olhada nesse link... http://xstream.codehaus.org/tutorial.html
String  xml = "Aqui vc coloca o XML de Saida";

    byte[] buffer = xml.getBytes();

   

    File newFile  = new File("c://arquivo.xml");

    FileOutputStream fileIn = new FileOutputStream(newFile, true);

    fileIn.write(buffer);

    fileIn.close();

acho que isso funciona...qualquer duvida...ou se vc quiser postar o seu codigo aqui...
Att

xwillianss
guilhermevh:
Da uma olhada nesse link... http://xstream.codehaus.org/tutorial.html
String  xml = "Aqui vc coloca o XML de Saida";

    byte[] buffer = xml.getBytes();

   

    File newFile  = new File("c://arquivo.xml");

    FileOutputStream fileIn = new FileOutputStream(newFile, true);

    fileIn.write(buffer);

    fileIn.close();

acho que isso funciona...qualquer duvida...ou se vc quiser postar o seu codigo aqui...
Att

Valeu meu brother eu conseguir.... fiz o que voce mandou e deu certo. Valeu.

Criado 9 de agosto de 2008
Ultima resposta 10 de ago. de 2008
Respostas 2
Participantes 2