Originally posted by William Brogden:
Basically you have two choices.
1. Create an in memory Document, create and add Element objects to it, transform to an output stream.
Advantages: rigourous
Disadvantages: a real pain to program
2. Just write all the various tags, etc with typical Java text writing methods.
Advantages: fast to program, runs fast
Disadvantages: may not write good XML
Personally I always go for 2 - you can have constant strings in your program for many of the tags and write great hunks of XML is a single statement.
Bill
Thanks Bill, always good to hear from you.
Can you provide or point me in the direction of an example of creating an XML doc from a database.
I am especially interested in the mechanism you use to write a lot of XML at one time. Is it just a matter of storing a
String in memory and then writing out the entire String to a file a one time?
Performace will be a key issue in the app I am writing so I do not want a lot of I/O overhaead.
Thanks again Bill,
Rob