BF [ 1705883 ] Export translation xml files are not indented
http://sourceforge.net/tracker/index.php?func=detail&aid=1705883&group_id=176962&atid=879332
This commit is contained in:
parent
66c31c3e63
commit
c57ecc59ad
|
@ -223,12 +223,17 @@ public class Translation
|
||||||
//
|
//
|
||||||
DOMSource source = new DOMSource(document);
|
DOMSource source = new DOMSource(document);
|
||||||
TransformerFactory tFactory = TransformerFactory.newInstance();
|
TransformerFactory tFactory = TransformerFactory.newInstance();
|
||||||
|
tFactory.setAttribute("indent-number", Integer.valueOf(1)); // teo_sarca [ 1705883 ]
|
||||||
Transformer transformer = tFactory.newTransformer();
|
Transformer transformer = tFactory.newTransformer();
|
||||||
// Output
|
transformer.setOutputProperty(OutputKeys.INDENT, "yes"); // teo_sarca [ 1705883 ]
|
||||||
|
// Output, wrapped with a writer - teo_sarca [ 1705883 ]
|
||||||
out.createNewFile();
|
out.createNewFile();
|
||||||
StreamResult result = new StreamResult(out);
|
Writer writer = new OutputStreamWriter(new FileOutputStream(out), "utf-8");
|
||||||
|
StreamResult result = new StreamResult(writer);
|
||||||
// Transform
|
// Transform
|
||||||
transformer.transform (source, result);
|
transformer.transform (source, result);
|
||||||
|
// Close writer - teo_sarca [ 1705883 ]
|
||||||
|
writer.close();
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue