1 - I'm using this code to generate my xml file:

XStream stream = new XStream(new DomDriver("ISO-8859-1", new
XmlFriendlyNameCoder("_-", "_")));
stream.processAnnotations(Notas.class);
stream.aliasSystemAttribute(null, "class");
 FileOutputStream outputStream;
try {
String nmArquivo =
iconfiguracao.getConfiguracao().getNmDiretorioCaixaSaida() + File.separator
+ nmArquivoRemessa;
outputStream = new FileOutputStream(nmArquivo);
stream.toXML(notas, outputStream);
outputStream.close();
} catch ( IOException e) {
e.printStackTrace();
}
but i want to know if its possible to i add the <?xml version="1.0"
encoding="ISO-8859-1"?>
at beginning of my file? how?



2 - have one easy way to transform some char during the creation of my file?
i need to transform this chars:

> in &lt;
< in &gt;
& in &amp;
" in &quot;
' in &#39;


tks

Reply via email to