[jdom-interest] XMLOutputter and newlines afterdeclaration/doctype
Vadim.Strizhevsky at morganstanley.com
Vadim.Strizhevsky at morganstanley.com
Thu Dec 19 10:06:34 PST 2002
On Thu, 19 Dec 2002, Elliotte Rusty Harold wrote:
> At 11:37 AM -0500 12/19/02, <Vadim.Strizhevsky at morganstanley.com> wrote:
>
> >1) Because its not valid XML as I desire to store multiple mesages in
> >single file.
>
> Then JDOM won't help you. JDOM is about XML.
Yes, it is about XML, and should be. Therefore you should let me
output XML the way I _want_ to. Don't worry about why I want to do that,
that's my buseiness. If JDOM is a generic library and you already have all
these customization options on XMLOutputter, what use are they if they
don't provide full control. Or at least one that make sense, and not
arbitrary done by the author who on behalf of the user makes the decision
of what's best, by ignoring the request.
>
> >2) performance.
>
> You've done the testing necessary to prove that XML parsing is a problem?
Yes. XML parsing and XMLoutputer is number 1 performance bottlenecks. I've
done some mods to XMLOuttpuer to increase performance even furhter. But
this for a separate mail.
> Sounnds like you're trying to use XML like a database, always a mistake.
You're arguing about specific instance, but that's not the point, it
should be upto me how I use it. I could store in DB, whatever, I'm just
trying to get it on one line. That's not such a big requirement.
>
> >You present an argument of human readability. But in reality humans
> >don't actually read XML that much in my world. They usually use tools to
> >display the particular XML in custom/convinient way. However what
> >happens more often is that various systems/programs pass XML between them
> >over various media, (network, MQ, files, etc...) As far those system
> >concerned they don't care what it looks like, but may care how much space
> >it occupies. Yea 4bytes is not huge deal, but in principle you
> >trying to represent xml as concisely as possible, but you just can't
> >completely do it.
> >
>
> That's your principle, not mine. Excessive worrying about size can be
> just as damaging as excessive worrying about speed. Fact is, in
> almost any application you're going to waste more on the empty space
> in disk blocks or even network packets than you're talking about
> saving.
True, so maybe that was a bad example. But my logical argument stands,
which you removed and didn't address.
Why do you all feel that it is such a big or unusual thing to ask for,
to be able to produce XML with no white space or newlines? You already
have API that is supposed to control this, but you arbitrarily decided
to not observe it in one place. That just doesn't make any logical sense
to me.
I wonder was that behavior there from the very first version or was added
later on someone's request for nicer look? without CVS I can't tell this.
-Vadim
More information about the jdom-interest
mailing list