Mam problem z tworzeniem pliku xml
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
DOMImplementation di = db.getDOMImplementation();
Document doc = di.createDocument(null, "macierze", null);
doc.getDocumentElement ().normalize ();
Element root = doc.getDocumentElement();
[...]
DOMSource ds = new DOMSource(doc);
StreamResult sr = new StreamResult(new File("dan.xml"));
TransformerFactory tf = TransformerFactory.newInstance();
Transformer trans = tf.newTransformer();
trans.transform(ds, sr);
to otrzymuje caly plik xml w jednej lini :/
// z łaski swojej pisz bardziej opisowe tematy, bo zwykle wątki z tytułem typu "xml" wylatują do kosza - Ł