Hi Chad, Chad La Joie <laj...@itumi.biz> wrote on 06/02/2010 01:59:11 PM:
> Thanks Michael, > > Somewhat related to this, I note that the feature 'defer-node-expansion' > can not be set to false when the default document factory is used[1]. That's the Xerces-J 1.x documentation. The behaviour of the feature in Xerces-J 2.x is documented here [2]. It's default is true but you can set its value to false if you want to. > I understand why a person might want to defer node expansion but in all of > my cases, I have to traverse every node. I am wondering, does having a > deferred node decrease performance, especially over larger documents, > when you're going to be hitting every node? If you traverse every node then I would expect it to cost more than if they were constructed eagerly by the parser. More details on the performance implications of this feature are in an article [3] I co-wrote some time ago. > If so, might it be possible to allow adjusting the defer-node-expansion > feature even when the default factory is used? Try setting the feature to false on the DocumentBuilder. > [1] http://xerces.apache.org/xerces-j/features.html#defer-node-expansion Thanks. [2] http://xerces.apache.org/xerces2-j/features.html#dom.defer-node-expansion [3] http://www.ibm.com/developerworks/library/x-perfap2.html/#N100CB Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org