public String toString() {
        StringBuffer b = new StringBuffer(100);
        b.append(reader.toString());
        b.append("\nLightXmlPullIterator:");
        b.append("\n\tdepth: ");
        b.append(depth);
        if (depth > 0) {
            b.append("\n\telement stack: ");
            for (int i = 0; i < depth; i++) {
                if (elementStack[i]!= -1) {
                    b.append(elementName[elementStack[i]]);
                } else {
                    b.append("unknown");
                }
                b.append(", ");
            }
            b.append("\n\tcurrent element: ");
            b.append(name());

            if (attrCount > 0) {
                b.append("\n\tattributes: ");
                for (int i = 0; i < attrCount; i++) {
                    b.append("\n\t\t");
                    b.append(attributeName[attrIndex[i]]);
                    b.append("=");
                    attrValues.setBounds((i==0)?0:attrBufferPos[i-1],attrBufferPos[i]);
                    b.append(attrValues.toString());
                }
            }
        }
        b.append("\n\tentire attribute buffer: ");
        b.append(attrValues.getInternalBuffer());
        return b.toString();
    }