Code example for Stack

Methods: isEmpty, peek

0
             
            this.cdataMode = false;
            if(this.cdataBufferLen > 0) {
                Node cdata = 
                        new CDATASection(ArrayUtils.copyOf(this.cdataBuffer, this.cdataBufferLen), false);
                if (this.elementStack.isEmpty()) {
                    this.rootNodes.add(cdata);
                } else { 
                    final Element parent = this.elementStack.peek();
                    parent.addChild(cdata);
                } 
                this.cdataBufferLen = 0;
            } 
             
        } 
         
 
         
 
        /* 
         * -------------