Hi Tamura, > > NodeIterator ni = some_node.getChildNodes(); > Node node = ni.toNext(); > >In this code, is a variable `node' the first child? Or second >child? I would say that this is unknown. Since the NodeIterator is "live", it makes sense for the same iterator to be used every time getChildNodes is called. It is definately not specified what should happen. Thus, the NodeIterator could be anywhere along the list of Nodes. The only way to be sure that you are where you think you are is to call one of the other "to" methods - 'toFirst', 'toLast', 'toNth', or 'toNode'. If the list is already there, it shouldn't be an expensive call. If it isn't, you are now in the correct place. It's the only way to guarantee. DavidReceived on Tuesday, 7 April 1998 07:16:40 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT