[jdom-interest] Element.getContentTrim() ?

Alexander Hvostov root at aoi.dyndns.org
Sun Oct 7 18:50:49 PDT 2001


Hi everyone. I just subscribed to this list to make a feature request... ;)

I think it would be useful for there to be a method
org.jdom.Element.getContentTrim() which functions just like getContent() only it
trims any String content as in getTextTrim().

I think this would be useful because this would allow for easy trimming of mixed
content -- consider an example in HTML:

  <p>
    This text
    is <b>marked
    up</b>.
  </p>

I'm sure all of you know how this would look in HTML. Unfortunately, an HTML
display program would need to do getContent() so that it can cause the <b>
elements (and other markup) to have their usual HTML effects, while still
supporting plain old text, trimmed in the usual SGML/HTML/XML way.

What does everyone else think?

Regards,

Alex.



More information about the jdom-interest mailing list