Hi Terry From: "Terry Steichen" <[EMAIL PROTECTED]> > > Thanks for the feedback. Let me expand my underlying question a bit. If I > get all nodes in a document with doc.selectNodes("//*"), the nodelist that > is returned is not in what might be called 'pretty print' order. For > example, assume a document with the following structure: > > <doc> > <aa> > <xx/> > <yy> > <pp/> > </yy> > </aa> > <bb> > <xx/> > <yy/> > </bb> > </doc> > > now, if I do a test.selectNodes("//*) and then loop through the results > printing out node.getUniquePath(), what I'd > like to see is something like: > > doc > doc/aa > doc/aa/xx > doc/aa/yy > doc/aa/pp > doc/bb > doc/bb/xx > doc/bb/yy > > But that's not the order that typically comes out. I'm trying to figure out > some way to ensure this is the order shown (using selectNodes()). I assume > (you know what that acronym stands for!) that the sorting option for > selectNodes() can do that, but am not sure how to accomplish it.
This is a current limitation of Jaxen; I think Jaxen is navigating the document in bredth, rather than depth first leading to this issue. Hopefully we'll be able to fix this soon. James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user