org.apache.xerces.impl.xs.dom
Class DOMNodePool
java.lang.Object
|
+--org.apache.xerces.impl.xs.dom.DOMNodePool
- public final class DOMNodePool
- extends java.lang.Object
This class is pool that enables caching of DOM nodes, such as Element, Attr,
Text, that are used to parse and later traverse XML Schemas.
The pool is reset before a new set of schemas is traversed.
Note: pool is not reset during traversals of imported/included
schemas.
- Version:
- $Id: DOMNodePool.java,v 1.2 2002/08/06 19:21:43 sandygao Exp $
- Author:
- Elena Litani, IBM
Method Summary |
AttrNSImpl |
getAttrNode()
This methods creates attribute node or provides a free
attribute node if such exists in the pool. |
ElementNSImpl |
getElementNode()
This method creates a new element node or provides a
free element node if such exists in the pool. |
TextImpl |
getTextNode()
This methods creates text node or provides a free
text node if such exists in the pool. |
void |
reset()
Reset the pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMNodePool
public DOMNodePool()
getElementNode
public final ElementNSImpl getElementNode()
- This method creates a new element node or provides a
free element node if such exists in the pool.
- Returns:
-
getTextNode
public final TextImpl getTextNode()
- This methods creates text node or provides a free
text node if such exists in the pool.
- Returns:
-
getAttrNode
public final AttrNSImpl getAttrNode()
- This methods creates attribute node or provides a free
attribute node if such exists in the pool.
- Returns:
-
reset
public void reset()
- Reset the pool. The nodes in the pool become 'free' nodes.
Copyright © 1999-2002 Apache XML Project. All Rights Reserved.