com.sun.xml.stream
Class XMLDocumentFragmentScannerImpl.ElementStack2

java.lang.Object
  extended by com.sun.xml.stream.XMLDocumentFragmentScannerImpl.ElementStack2
Enclosing class:
XMLDocumentFragmentScannerImpl

protected class XMLDocumentFragmentScannerImpl.ElementStack2
extends java.lang.Object

Element stack.

Author:
Neeraj Bajaj, Sun Microsystems.

Field Summary
protected  int fCount
           
protected  int fDepth
           
protected  int fLastDepth
           
protected  int fMark
           
protected  int fPosition
           
protected  org.apache.xerces.xni.QName[] fQName
          The stack data.
 
Constructor Summary
XMLDocumentFragmentScannerImpl.ElementStack2()
          Default constructor.
 
Method Summary
 void clear()
          Clears the stack without throwing away existing QName objects.
 org.apache.xerces.xni.QName getNext()
          Note that this function is considerably different than nextElement() This function just returns the previously stored elements
 boolean matchElement(org.apache.xerces.xni.QName element)
          Check if the element scanned during the start element matches the stored element.
 org.apache.xerces.xni.QName nextElement()
          This function doesn't increase depth.
 int popElement()
          returns the current depth
 void resize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fQName

protected org.apache.xerces.xni.QName[] fQName
The stack data.


fDepth

protected int fDepth

fCount

protected int fCount

fPosition

protected int fPosition

fMark

protected int fMark

fLastDepth

protected int fLastDepth
Constructor Detail

XMLDocumentFragmentScannerImpl.ElementStack2

public XMLDocumentFragmentScannerImpl.ElementStack2()
Default constructor.

Method Detail

resize

public void resize()

matchElement

public boolean matchElement(org.apache.xerces.xni.QName element)
Check if the element scanned during the start element matches the stored element.

Returns:
true if the match suceeds.

nextElement

public org.apache.xerces.xni.QName nextElement()
This function doesn't increase depth. The function in this function is broken down into two functions for efficiency. <@see>matchElement. This function just returns the pointer to the object and its values are set.

Returns:
QName reference to the next element in the list

getNext

public org.apache.xerces.xni.QName getNext()
Note that this function is considerably different than nextElement() This function just returns the previously stored elements


popElement

public int popElement()
returns the current depth


clear

public void clear()
Clears the stack without throwing away existing QName objects.



Copyright ? 2002-2003 Apache XML Project. All Rights Reserved.