On Sun, 2009-07-12 at 11:10 +0200, Andreas Hartmann wrote: > Hi Thorsten, > > Thorsten Scherler schrieb: > > Hi all, > > > > I was following our tutorial at > > http://lenya.apache.org/docu20/tutorials/usecaseTutorial/usecaseTutorialPart2.html > > and found: > > > > Document doc = getSourceDocument(); Document[] allDocs = > > doc.area().getDocuments(); > > > > Now I know how to get all documents but my question is how to get > > only the direct parents of the node till the first node? > > SiteNode node = doc.getLink().getNode(); > List<SiteNode> ancestors = new List<SiteNode>(); > while (!node.isTopLevel()) { > SiteNode parent = node.getParent(); > ancestors.add(parent); > node = parent; > } > > (please excuse any errors, but this should help to get the general idea) > > HTH, > > -- Andreas
:) Your are my hero! Thank you very much Andreas. salu2 -- Thorsten Scherler <thorsten.at.apache.org> Open Source <consulting, training and solutions> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
