[jdom-interest] Attribute.getParent()

Jason Hunter jhunter at collab.net
Wed Aug 30 16:55:01 PDT 2000

> Any chance I could get an implementation of:
> public class Attribute {
>         ...
>         public Element getParent() {
>                 ...
>         }
> }

I'd support it to help XPath.  It'd take some work to implement, but it
has the added benefit that then an Attribute can only be added to a
document once because you can check its parent.  Considering Attribute
has a setValue() method that's probably the right behavior.

> (and maybe for Comment/ProcessingInstruction also?)

Hmm...  What would you do with String "nodes" where a getParent() method
isn't possible?


More information about the jdom-interest mailing list