[XOM-interest] A small request
dirk at juniper.net
Tue Jan 6 21:24:04 EST 2004
On 01/06/2004 05:10 PM, Elliotte Rusty Harold was heard to exclaim:
> It's not merely the effort to implement it. It's the effort to
> understand it. I think the complexity of a class's API is more than
> linear in the number of public methods.
Yeah, I'll buy that. My codebase has an astonishing number of (mostly
internal) methods, and I'm always referring to the javadocs.
> I also don't think your use-case is common. This is the first time
> I've heard of a request for it.
Huh. I figured that a lot of folks would use XML this way. Guess I'm
living a sheltered life...
> 1. You can set a maxLength and an indent and then add an
> xml:space="preserve" attribute to all elements where you don't want
> an internal break to appear.
I thought about doing this, but I'd need to add it to 90% of the elements,
and it would be ugly.
> 2. You can write your own subclass of Serializer that provides the
> methods and behavior you need.
That's what I did. It really wasn't all that hard, so I'm not complaining.
> 3. You can use nu.xom.samples.WrappingSerializer.
I hadn't thought to look in samples (silly me). That's a slick solution,
but the subclass I have is closer to what I want.
Thanks for looking over my suggestion. I guess I'm satisfied with the
Dirk Bergstrom dirk at juniper.net
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905
More information about the XOM-interest