[jdom-interest] instanceof Text and XMLOutputter request

Todd O'Bryan toddobryan at mac.com
Thu Apr 4 06:24:44 PST 2002

Oh, this works fine. But since there seems to be an implied parallelism 
between output and outputString methods in the XMLOutputter class, my 
point is that the lack of a String-producing version of 
outputElementContent is inconsistent with the rest of the class.

I don't mind writing a few lines of extra code, but I kept looking for 
the method that would do what I wanted, because once I found 
outputElementContent I assumed there had to be a String version in there 
somewhere, given the rest of the code.


On Wednesday, April 3, 2002, at 08:51 PM, Philip Nelson wrote:

>> (a) String outputElementContentAsString(Element e)
> How about (and I am doing this from memory but...)
> StringWriter sw = new StringWriter()
> XMLOutputter out = new XMLOutputter(sw);
> out.output(yourElement);
> String whatYouWant = sw.toString();
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-
> interest/youraddr at yourhost.com

More information about the jdom-interest mailing list