[jdom-interest] parentless DOM nodes created by DOMOutputter

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Apr 18 09:20:01 PDT 2002

At 8:20 PM -0700 4/17/02, Jason Hunter wrote:
>Elliotte Rusty Harold wrote:
>>  At 3:41 PM -0400 4/17/02, Alex Rosen wrote:
>>  >Couldn't we just let the user pass in the DOM Document for us to use? Seems
>>  >easy, but looking at the DOMOutputter code and not understanding it at all,
>>  >I'm not sure.
>>  >
>>  There are already two methods that do exactly that. I'm suggesting we
>>  get rid of the two methods oin which we don't pass a Document object.
>But they're protected.  Hmm, should they be public?

Maybe. I guess the real question is what is the use-case for these? 
How often is someone going to want to import a JDOM node into a DOM 
Document? Keep in mind that even after importing it, it still won't 
be a pat of the DOM tree. The programmer will still need to attach it 
to the tree at some point.

If we are going to have these. I think we should add the rest for 
completeness; e.g. methods to output Comment, ProcessingInstruction, 
Text, etc.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |

More information about the jdom-interest mailing list