[jdom-interest] hasMixedContent()

philip.nelson at omniresources.com philip.nelson at omniresources.com
Tue May 15 18:28:37 PDT 2001


> The getMixedContent() method has always bothered me a little, 
> because it's a
> misnomer. Mixed content means that an element can contain 
> both text and child
> elements. It says nothing about comments, for example 

I seem to remember a fur fight about the some of these names and this is
what we've got...
> 
> Does this bother anyone else? How should we fix it? Ideally, 
> I'd like to make
> name changes similar to the ones mentioned above, so that the 
> method names say
> what they really mean. (We are building a Java standard, 
> after all.) Barring
> that, we could just get rid of hasMixedContent(), unless 
> anyone can come up
> with a reason why it's useful.

I've never used hasMixedContent.  As I recall, the use case had to do with
text interspersed with elements and other nodes.  It allowed you to safely
assume you were dealing with only the textual content if you used getText().
Is this still true?



More information about the jdom-interest mailing list