[jdom-interest] Builder.build() write/append/create

Jon Baer jonbaer at digitalanywhere.com
Tue Aug 1 13:10:56 PDT 2000

Brett McLaughlin wrote:

> First, I was really confused by your mail - maybe you've been away /too/
> long ;-) In any case, if what I'm hearing is correct, you can certainly
> create an XML document with JDOM in memory (org.jdom.Document) and then
> output that to a new FileOutputStream with XMLOutputter. That of course
> creates a new file. File I/O can be done one of two ways - read
> existing, update file, write out file (or overwrite, if that's what you
> want); or, by using File I/O to open a stream into the file and directly

Yeah you kinda got what I was talking about (maybe I have been away too long), here is
what I have, Im building a "profile" system with XML where it breaks up a user via
account number with other .xml profiles such as:


Right now Im treating it as a whole, loading the parts that need to be loaded as
document as needed but instead Ive written a wrapper to deal with if the profile
exists, add new items to profile, etc.

Thank god for JDOM because it makes it so extremely easy but just wondering if there
might be something underneath to deal with the FileOutputStream.

- Jon

More information about the jdom-interest mailing list