On Thursday 19 April 2007 5:28:36 am Miro Sabo wrote: > I have a problem parsing file of Jess code into JessML. Everything is > parsed as it should, but there is no end tag for root element <rulebase>, > so output xml document is not well-formed. If I use XMLPrinter.main() > method, I get exactly the result that I need, but I get it on standard > output. The thing is I need to save it into the file. I don't understand > why > XMLPrinter.printBackMatter() method in my code is not working.
I suspect it's just a common Java programming problem: after writing the data to a file, you need to either close the file (i.e., call close() on your Writer) or at least call flush(). Until you do one of these things, the output may be buffered internally by Java or by the operating system, and won't all actually appear in the file. If your Java program quits without closing or flushing the file, the file may remain incomplete. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
