Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to get a schema parent?
How to get a schema parent? [message #536198] Thu, 27 May 2010 11:16
Walter Brunauer is currently offline Walter Brunauer
Messages: 6
Registered: July 2009
Junior Member
Hi there,

please ignore my ignorance, but I can't find an obvious way to get the schema parent of a given schema node. I would like to have something similar to org.w3c.dom.Node.getParentNode() in org.eclipse.wst.xml.core.internal.contentmodel.CMNode. I can't believe I am the first one needing this API.

My best choice currently is to look up the parent top down starting from the schema root, and if I find the given schema node, I take the schema parent I just came from in the recursion. This of course is cumbersome and expensive. Another way would be to cache all child-parent relations, but again, this is way off being ideal.

Is this really the best approach?

Any help highly appreciated!

Thanks a lot in advance,

Walter Brunauer
Previous Topic:How to get hold of appropriate Document object for XML Content Assist ?
Next Topic:How to ignore a symlinked folder in a validator
Goto Forum:
  


Current Time: Mon Sep 22 06:30:36 GMT 2014

Powered by FUDForum. Page generated in 0.02396 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software