You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Greg Matthews <gm...@flex.com.au> on 2000/03/30 01:15:20 UTC

help! nextNode() "hangs" ? XercesJ-1_0_3

dear all,

we've got a showstopper issue related to the nextNode
method taking an extremely long time when:

- you're nextNode'ing on a largish document
- the element you're searching for doesn't exist.

nextNode can hang for 30-40 seconds on a document
with, say, 30 elements, each element having 10 attributes,
and the element being searched for doesn't exist.

i've tried with/without hotspot, and also run through
the debugger but don't know whether the behaviour
i'm seeing is normal.

below is a sample that demonstrates the behaviour
i'm not sure about. 

do we have a dodgy NodeFilter implementation?
or does TreeWalkerImpl have a bug?

input xml doc.

<a>
  <b/>
  <c/>
  <f>
    <g>
      <h>
        <i>
          <j/>
        </i>  
      </h>
    </g>
  </f>
</a>


output from a println within our NodeFilter implementation
(attached). 

b
c
f
g
h
i
j
i
h
g
f
a   <= i'm ok down to here. this is the top of the tree again so should things stop here?
h
g
f
a
g
f
a
f
a
a


thanks very much,

greg.


jdk1.2.2
windows 2000
Xerces-1_0_3 Java