The safest choice from a wellformed-ness point of view would be to use the DOM API and JAXP for constructing the XML documents in-memory, and then serialize them into the text-based XML files you need as output. Another option would be to write the XML output by hand using a java.io.FileWriter and a lot of write("<something>") statements. Easy (no need to learn the XML programming APIs), but unsafe (you're responsible for encoding special characters correctly, etc.).
thanks. and another problem i met at this moment is,how can i read in the .doc files using java. i can read in text files now,but how about the .doc because i have to take them in and then convert them to xml file as output. [ April 21, 2004: Message edited by: Dan Xu ] [ April 21, 2004: Message edited by: Dan Xu ]