Hi, Given your question, I assume you mean descendant nodes, and not child nodes (which are just the first level descendants). If you don't want to walk the DOM each time then you will have to cache the information some how. This is probably worth it if you dont have to change the document a lot. If speed is a real consideration then there are some patches lying around the Pathan tree somewhere which keep maps of node name/uri -> nodes in element as well as the standard list. You take the hit when you update the document then though.
Out of interest (and the possibility we can suggest a better way), why do you have to do this? Gareth On Wed, 19 May 2004, Justin wrote: > What is the best way to answer the question: Are there any child nodes > in namespace X? > > I have seen the NodeFilter and TreeWalker/Traversal options. > There is Xalan, but I haven't needed it yet and I dread adding another > dependency and code for this. > > I would like to avoid walking the entire DOM for each query. Is there > some way to take advantage of the internal dom structure of xerces to > make this query as quick and painless as possible? > > > > Thnx, > Justin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://www.parthcomp.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]