[jdom-interest] getTextTrim() question

Jason Hunter jhunter at collab.net
Fri Apr 20 20:03:23 PDT 2001


Not currently.

-jh-

Mark J Laird wrote:
> 
> That's a good idea, and would work well for an individual Element.  I would like
> to have XMLOutputter do this for all of my Elements on output.  Is there a way
> to set the XMLOutputter so that it uses Element.getText().trim() rather than
> Element.getTextTrim()?
> 
> Mark
> 
> > The easiest way to get this behaviour would be simply getText().trim()
> >
> > -Matt
> >
> > ----- Original Message -----
> > From: "Mark J Laird" <Markl at waterford.org>
> > To: <jdom-interest at jdom.org>
> > Sent: Friday, April 20, 2001 1:05 PM
> > Subject: [jdom-interest] getTextTrim() question
> >
> > > Hi all,
> > >
> > > I have a question about getTextTrim() in org.jdom.Element.  According to
> > the documentation, it
> > > will remove all external whitespace, and normalize all internal whitespace
> > to one space.  Is
> > > there any way to have it do external trimming only and leave internal
> > content unchanged?  In
> > > other words, if I have the following text:
> > >         "  This   has   spaces.  "
> > > Is there any way to get it to return:
> > >         "This   has   spaces."
> > > Rather than
> > >         "This has spaces."
> > >
> > > I am using XMLOutputter's "setTextTrim" method which invokes
> > Element.getTextTrim(), and I would
> > > like to be able to do external trimming only, if possible.
> > >
> > > Thanks,
> > >
> > > Mark
> > >
> > > _______________________________________________
> > > To control your jdom-interest membership:
> > >
> > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> > t.com
> > >
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list