Subject: Writing on a file stream element by element 2007-10-04 - By NP
Back Hi.
I have a document so: mydoc = new Document(); a root element: rootElement = new Element(....); mydoc.setRootElement(rootElement);
Now i create a new element: Element myel = new Element(.....);
addin' it to the root: rootElement.addContent(myel);
Now i must add the new information (myel) on a file. The code that i wrote was: XMLOutputter out = new XMLOutputter(....); out.output(mydoc, new File(....));
But in this way, everytime, i write the whole document in the file (delete file and rewrite the updated document). My problem, instead, is write the new element one by one, everytime that i create it. __ ____ ____ ____ ____ ____ ____ ____ ____ ____ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
|
|