No subject


Fri Aug 6 17:04:17 PDT 2004


<br>
<table>
  <tbody>
    <tr>
      <th align="left">        Text Mode      </th>
      <th>        Resulting behavior.      </th>
    </tr>
     <tr valign="top">
      <td>        <i>Default</i>      </td>
      <td>        All content is printed in the format it was created, no
whitespace        or line separators are are added or removed.</td>
    </tr>
  </tbody>
</table>
<br>
and...<br>
<hr>  <a name="setNewlines(boolean)"><!-- --></a>
<h3> setNewlines</h3>
 
<pre>public void <b>setNewlines</b>(boolean&nbsp;newlines)</pre>
 
<dl>
  <dd>
    <p>  Sets whether newlines (<code>lineSeparator</code>) should  be printed. 
 </p>
 
    <p> </p>
  </dd>
  <dd> </dd>
  <dd><br>
  </dd>
  <dl>
    <dt><b>Parameters:</b></dt>
    <dd><code>newlines</code> - <code>true</code> indicates new lines should
be                  printed, else new lines are ignored (compacted).</dd>
    <dt><b>See Also:</b></dt>
    <dd><a
 href="http://www.jdom.org/docs/apidocs/org/jdom/output/XMLOutputter.html#setLineSeparator%28java.lang.String%29"><code>setLineSeparator(String)</code></a></dd>
  </dl>
</dl>
<br>
Vadim's request to make the behavior of the class match what is specified
in its javadoc seems reasonable to me. He's reason for wanting to do it is
irrelevant. If the JDOM maintainers don't agree that the class should be
changed then perhaps at least the javadoc should be corrected.<br>
<br>
Eric Rosenberg<br>
<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Vadim.Strizhevsky at morganstanley.com">Vadim.Strizhevsky at morganstanley.com</a> wrote:<br>
<blockquote type="cite"
 cite="midPine.GSO.4.33.0212191253520.5938-100000 at elegua">
  <pre wrap="">
On Thu, 19 Dec 2002, Elliotte Rusty Harold wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">At 11:37 AM -0500 12/19/02, <a class="moz-txt-link-rfc2396E" href="mailto:Vadim.Strizhevsky at morganstanley.com">&lt;Vadim.Strizhevsky at morganstanley.com&gt;</a> wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">1) Because its not valid XML as I desire to store multiple mesages in
single file.
      </pre>
    </blockquote>
    <pre wrap="">Then JDOM won't help you. JDOM is about XML.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">2) performance.
      </pre>
    </blockquote>
    <pre wrap="">You've done the testing necessary to prove that XML parsing is a problem?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

  </pre>
  <blockquote type="cite">
    <pre wrap="">Sounnds like you're trying to use XML like a database, always a mistake.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">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.

      </pre>
    </blockquote>
    <pre wrap="">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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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


_______________________________________________
To control your jdom-interest membership:
<a class="moz-txt-link-freetext" href="http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com">http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com</a>

.

  </pre>
</blockquote>
<br>
<br>
</body>
</html>

--------------020600080200060208000204--




More information about the jdom-interest mailing list