Package org.dom4j.io
Class PruningElementStack
- java.lang.Object
-
- org.dom4j.io.ElementStack
-
- org.dom4j.io.PruningElementStack
-
- All Implemented Interfaces:
ElementPath
class PruningElementStack extends ElementStack
PruningElementStackis a stack ofElementinstances which will prune the tree when a path expression is reached. This is useful for parsing very large documents where children of the root element can be processed individually rather than keeping them all in memory at the same time.- Version:
- $Revision: 1.11 $
- Author:
- James Strachan
-
-
Field Summary
-
Fields inherited from class org.dom4j.io.ElementStack
lastElementIndex, stack
-
-
Constructor Summary
Constructors Constructor Description PruningElementStack(String[] path, ElementHandler elementHandler)PruningElementStack(String[] path, ElementHandler elementHandler, int defaultCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidpathMatches(Element parent, Element selectedNode)ElementpopElement()Pops the element off the stackprotected booleanvalidElement(Element element, int index)-
Methods inherited from class org.dom4j.io.ElementStack
addHandler, clear, containsHandler, getCurrent, getDispatchHandler, getElement, getPath, peekElement, pushElement, reallocate, removeHandler, setDispatchHandler, size
-
-
-
-
Constructor Detail
-
PruningElementStack
public PruningElementStack(String[] path, ElementHandler elementHandler)
-
PruningElementStack
public PruningElementStack(String[] path, ElementHandler elementHandler, int defaultCapacity)
-
-
Method Detail
-
popElement
public Element popElement()
Description copied from class:ElementStackPops the element off the stack- Overrides:
popElementin classElementStack- Returns:
- the element that has just been popped off the stack
-
validElement
protected boolean validElement(Element element, int index)
-
-