Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] A small request

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: dirk bergstrom <dirk AT juniper.net>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] A small request
  • Date: Tue, 06 Jan 2004 18:24:04 -0800

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
subclass solution.

--
Dirk Bergstrom dirk AT juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905




Archive powered by MHonArc 2.6.24.

Top of Page