code: public final void push(String prefix, String localName) throws XMLStreamException
      {
          if (++mDepth > mConfig.getMaxElementDepth()) {
              throw new XMLStreamException("Maximum Element Depth limit ("+mConfig.getMaxElementDepth()+") Exceeded");
          }
          if (++mTotalElements > mConfig.getMaxElementCount()) {
              throw new XMLStreamException("Maximum Element Count limit ("+mConfig.getMaxElementCount()+") Exceeded");
          }
          String defaultNs = (mCurrElement == null) ?
              XmlConsts.DEFAULT_NAMESPACE_URI : mCurrElement.mDefaultNsURI;
          if (mCurrElement != null) {
              ++mCurrElement.mChildCount;
              final int max = mConfig.getMaxChildrenPerElement();
              if (max > 0 && mCurrElement.mChildCount > max) {
                  throw new XMLStreamException("Maximum Number of Child Elements limit ("+max+") Exceeded");
              }
          }
  
          if (mFreeElement == null) {
              mCurrElement = new Element(mCurrElement, mNamespaces.size(), prefix, localName);
          } else {
              Element newElem = mFreeElement;
              mFreeElement = newElem.mParent;
              newElem.reset(mCurrElement, mNamespaces.size(), prefix, localName);
              mCurrElement = newElem;
          }
          mCurrElement.mDefaultNsURI = defaultNs;
          mAttrCollector.reset();
  
          /* 20-Feb-2006, TSa: Hmmh. Namespace default provider unfortunately
           *   needs an advance warning...
           */
          if (mNsDefaultProvider != null) {
              mMayHaveNsDefaults = mNsDefaultProvider.mayHaveNsDefaults(prefix, localName);
          }
      }
docs: Method called by the stream reader to add new (start) element
  into the stack in namespace-aware mode; called when a start element
  is encountered during parsing, but only in ns-aware mode.
  @throws XMLStreamException