[jdom-interest] Fw: Suggestion for JDOM

Brett McLaughlin brett at newInstance.com
Mon May 7 09:38:51 PDT 2001


----- Original Message ----- 
From: "Richard Baldwin" <baldwin at austin.cc.tx.us>
To: <brett.mclaughlin at javaworld.com>
Sent: Monday, May 07, 2001 11:00 AM
Subject: Suggestion for JDOM


> Hello Brett:
> 
> Thanks for developing JDOM and making it available to
> Java programmers.  
> 
> It seems to me that when I invoke getMixedContent() on
> an Element, the resulting list should not contain a
> reference to a String object for the text content of
> the element.  Rather, it should contain a reference to
> an object of some new class that encapsulates the
> String, but also provides methods to implement other
> capabilities such as those available with a Comment
> object.
> 
> For example, as it now stands, it is not possible to
> invoke getParent() on the representation of the text
> content of the element that is referred to by the item
> in the list, because String doesn't recognize that
> method.  This tends to break the pattern of the
> programming interface for text content as compared to
> Element, Comment, ProcessingInstruction, and Entity
> objects.
> 
> Encapsulating the text content of the element in such
> an object would result in a more consistent programming
> interface.
> 
> Thanks
> Dick Baldwin
> 
> PS:  Keep publishing.  I find your articles and your
> O'Reily book very informative.
> 
> -- 
> =========================================================
> Richard G. Baldwin (Dick Baldwin)
> Home of Baldwin's on-line Java Tutorials
> http://www.geocities.com/Athens/7077/scoop/onjava.html
> 
> Professor of Computer Studies
> Austin Community College
> (512) 223-4758 or (512) 250-8682
> mailto:baldwin.richard at iname.com  
> http://www2.austin.cc.tx.us/baldwin/
> ---------------------------------------------------------




More information about the jdom-interest mailing list