[jdom-interest] Attribute.getParent()

bob bob at accurev.com
Wed Aug 30 18:08:35 PDT 2000


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

Well, XPath allows a/b/text()/.. to retrieve the parent of text-node children
of <b> elements.  (Effectively selecting <b> elements).

Wacky, but it's the spec.

If I can't get jdom to explicitly provide a Text instead of String for text nodes,
I'll just pull out the String as provided, and wrap into a TextNode m'self,
along with the Element I yanked the String from.  Alas that's bundles of
new objects, but it'll work. ;)

That help?

	-bob




More information about the jdom-interest mailing list