Using Dom4j will not really make it easier. Your current setup seems to do the following: - read the input file, - generate an xml document in memory, - validate the xml file.
The best way I can think of would be to generate the SAX events yourself, implementing a XMLReader. <http://www.developer.com/xml/article.php/2108031> Note: Manipulating Strings the way you are doing is very costly, why not use a StringBuffer or a Writer? Regards, Edwin ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user