[jdom-interest] Important proposal: Element/Document changes

Brett McLaughlin brett.mclaughlin at lutris.com
Wed Jul 26 14:11:31 PDT 2000

Jools Enticknap wrote:
<snip-lots-of-agreement />
> But what about;
> List getAttributeValues(String name)
> List getAttributeValues(String name, Namespace ns)

?? attributes must be unique for an element. Can't have two. 

> void addAttributeValue(String name, String value)
> void addAttributeValue(String name, String value, Namespace ns)
> Should'nt the above also implemented for completeness ? Or am I missing
> something obvious ?

Oh... to clarify:

getAttributeValue(String name) is the same as:


as opposed to actually getting the Attribute object. Are we getting
mixed up somehwere? I'm not sure what you are asking :~<

> >
> > Element addContent(String text)
> > Element addContent(Element element)
> > Element addContent(ProcessingInstruction pi)
> > Element addContent(Entity entity)
> > Element addContent(Comment comment)
> >   Adds the given content to the element.  Replaces the various
> > addChild() methods because we're not treating Comments and such as
> > "children".  (Before you could call addChild(pi) and then call
> > getChildren() and wouldn't find the method returning the pi!)
> +0
> However getContent() will only return the textual content, and
> getMixedContent() will have to be called to get all the content added
> using the addContent() method.
> Mmmm, I'm not totally sure I like this.

getContent() is gone. getMixedContent() returns everything, getText()
returns text, getChildElement(s)() returns elements. So getContent() no
longer exists...


> --Jools

Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 

More information about the jdom-interest mailing list