Well large file handling works pretty well in case of Xml document even in wm 7.X environments, from the screenshot i am not able to understand that when you are invoking getNextNode and switching on variable next… why are you trying to exit without checking the value in Next… if that is null… then exit should be used.
please recheck what the output of pub.web.getNextNode for you?