From: Pete Cassetta <pete@fi...> - 2003-01-07 18:24:03
Between holidays and trying to get as much done as possible before our
(5th) baby comes (due in 4 1/2 weeks), I've let my XML enc/Writer
correspondence slip. Sorry about that.
I just read everything you two have posted, and I'm quite impressed with
what you're up to Henri. My XML writing needs are still quite basic, so
I don't have the same motivation as you to get all those new features
going. But they will be of great help for many potential users. I'll
have to grab the code and get a closer look at it.
> Working now. I suspect it has issues, but I think I've tweaked and
> murdered Pete's code enough that it seems to work on basic tests.
Once things stabilize, I should probably revisit pretty printing. In
order to reduce object creation and keep the code simple, you may recall
I didn't handle XHTML-style documents nicely (where many nodes contain
both text and elements). This should probably be rectified, and doing so
may require adding some options to the constructor and/or via a method
> Writer sw = new StringWriter();
> XmlWriter xw = new XmlEncXmlWriter(sw);
> xw = new FormattingXmlWriter(xw).setDateFormat(
> new java.text.SimpleDateFormat("yyyy-MM-dd")).
> setNumberFormat(new java.text.DecimalFormat("#"));
> xw = new EmptyElementXmlWriter(xw).
> xw = new PrettyPrinterXmlWriter(xw);
A bit messy/complex, but that's the price you pay for flexibility I guess.
> [I've made all setXxx methods return their object. Probably breaks the
> Bean-ness, but I'm treating this as a play with the method-chaining
> or they could do:
> XmlWriter xw = XmlIO.prettyPrinter(
> XmlIO.emptyElement( XmlIO.NULL_EMPTY_MODE,
> XmlIO.formatted( "yyyy-MM-dd", "#",
> XmlIO.xmlenc( new StringWriter() )
Well, I for one applaud this breach of the bean rules. This makes the
code much more readable.
Keep up the great work. I'll try to keep in closer touch.
433 Kitty Hawk Rd., Suite 216
P.O. Box 2487
Universal City, TX 78148
Orders: (800) 209-4063 -or- (210) 659-6832
Support: (210) 659-2532
Fax: (210) 659-8870
From: Ernst de Haan <znerd@FreeBSD.org> - 2003-01-09 10:22:28
> Between holidays and trying to get as much done as possible before our
> (5th) baby comes (due in 4 1/2 weeks), I've let my XML enc/Writer
> correspondence slip. Sorry about that.
No problemo. Henri and I've been busy as well :) Welcome back.
Ernst de Haan
Development Team Leader
Wanadoo Nederland B.V.
The Lord has truly risen!
Merry Christmas and a blessed New Year!