|How to get a schema parent? [message #536198]
||Thu, 27 May 2010 11:16
| Walter Brunauer
Registered: July 2009
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,
Powered by FUDForum
. Page generated in 0.02041 seconds