protected class XMLDocumentFragmentScannerImpl.ElementStack extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
fCount |
protected int |
fDepth |
protected QName[] |
fElements
The stack data.
|
protected int[] |
fInt |
protected int |
fLastDepth |
protected int |
fMark |
protected int |
fPosition |
| Constructor and Description |
|---|
XMLDocumentFragmentScannerImpl.ElementStack()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the stack without throwing away existing QName objects.
|
QName |
getLastPoppedElement()
This function is as a result of optimization done for endElement --
we dont need to set the value for every end element encouterd.
|
QName |
getNext()
Note that this function is considerably different than nextElement()
This function just returns the previously stored elements
|
boolean |
matchElement(QName element)
Check if the element scanned during the start element
matches the stored element.
|
QName |
nextElement()
Returns the next element on the stack.
|
QName |
popElement()
Pops an element off of the stack by setting the values of
the specified QName.
|
void |
push()
This function should be called only when element was skipped sucessfully.
1.
|
QName |
pushElement(QName element)
Pushes an element on the stack.
|
void |
reposition()
Reposition the stack. fInt [] contains all the opened tags at particular depth.
|
protected QName[] fElements
protected int[] fInt
protected int fDepth
protected int fCount
protected int fPosition
protected int fMark
protected int fLastDepth
public XMLDocumentFragmentScannerImpl.ElementStack()
public QName pushElement(QName element)
Note: The QName values are copied into the stack. In other words, the caller does not orphan the element to the stack. Also, the QName object returned is not orphaned to the caller. It should be considered read-only.
element - The element to push onto the stack.public QName getNext()
public void push()
public boolean matchElement(QName element)
public QName nextElement()
public QName popElement()
Note: The object returned is not orphaned to the caller. Therefore, the caller should consider the object to be read-only.
public void reposition()
public void clear()
public QName getLastPoppedElement()
Copyright © 2018–2021 mhoffrogge. All rights reserved.