[jdom-interest] First impressions and some suggestions
Jason Hunter
jhunter at acm.org
Fri Jun 2 08:54:13 PDT 2000
Elliotte Rusty Harold wrote:
>
> The default should be to do what the XML spec requires. That's
> preserving white space.
If we have two differently named methods for retrieving the String
content, then there's no actual "default". The whitespace will be saved
in the internal content list of course, and method A will return it and
method B will trim it for convenience. I propose that method B be named
getContent() to allow Brett's book to not confuse the 50,000 people who
are going to buy it. (I believe that's a very important consideration
since I don't want a steady stream of confused people constantly joining
this list -- and you can complain about there being a book talking about
JDOM at this early stage but remember Brett put so much of his time into
JDOM because it coincided with his book interests.) Proposals for the
other names are welcome. getContentRaw() is the best I've come up with
but don't really like it. getRawContent()? getUntrimmedContent()?
Hmm...
This means I suppose that getMixedContent() will have to return in its
list Strings that contains surrounding whitespace. That will make our
pretty print output awfully ugly though. Thoughts on this issue.
-jh-
More information about the jdom-interest
mailing list