prefix != null ? name : rawName.toString());
prefix != null ? rawName.toString() : name );
    public void parseSubTree(XmlPullParser pp) throws SAXException, IOException {        this.pp = pp;        final boolean namespaceAware = pp.getFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES);        try {            if(pp.getEventType() != XmlPullParser.START_TAG) {                throw new SAXException(                    "start tag must be read before skiping subtree"+pp.getPositionDescription());            }            final int[] holderForStartAndLength = new int[2];            final StringBuffer rawName = new StringBuffer(16);            String prefix = null;            String name = null;            int level = pp.getDepth() - 1;            int type = XmlPullParser.START_TAG;            LOOP:            do {                switch(type) {                    case XmlPullParser.START_TAG:                        if(namespaceAware) {                            final int depth = pp.getDepth() - 1;                            final int countPrev =                                (level > depth) ? pp.getNamespaceCount(depth) : 0;                            //int countPrev = pp.getNamespaceCount(pp.getDepth() - 1);                            final int count = pp.getNamespaceCount(depth + 1);                            for (int i = countPrev; i < count; i++)                            {                                contentHandler.startPrefixMapping(                                    pp.getNamespacePrefix(i),                                    pp.getNamespaceUri(i)                                );                            }                            name = pp.getName();                            prefix = pp.getPrefix();                            if(prefix != null) {                                rawName.setLength(0);                                rawName.append(prefix);                                rawName.append(':');                                rawName.append(name);                            }                            startElement(pp.getNamespace(),                                         name,                                         prefix != null ? name : rawName.toString());                        } else {                            startElement(pp.getNamespace(),                                         pp.getName(),                                         pp.getName());                        }                        //++level;                        break;                    case XmlPullParser.TEXT:                        final char[] chars = pp.getTextCharacters(holderForStartAndLength);                        contentHandler.characters(chars,                                                  holderForStartAndLength[0], //start                                                  holderForStartAndLength[1] //len                                                 );                        break;                    case XmlPullParser.END_TAG:                        //--level;                        if(namespaceAware) {                            name = pp.getName();                            prefix = pp.getPrefix();                            if(prefix != null) {                                rawName.setLength(0);                                rawName.append(prefix);                                rawName.append(':');                                rawName.append(name);                            }                            contentHandler.endElement(pp.getNamespace(),                                                      name,                                                      prefix != null ? name : rawName.toString()                                                     );                            // when entering show prefixes for all levels!!!!                            final int depth = pp.getDepth();                            final int countPrev =                                (level > depth) ? pp.getNamespaceCount(pp.getDepth()) : 0;                            int count = pp.getNamespaceCount(pp.getDepth() - 1);                            // undeclare them in reverse order                            for (int i = count - 1; i >= countPrev; i--)                            {                                contentHandler.endPrefixMapping(                                    pp.getNamespacePrefix(i)                                );                            }                        } else {                            contentHandler.endElement(pp.getNamespace(),                                                      pp.getName(),                                                      pp.getName()                                                     );                        }                        break;                    case XmlPullParser.END_DOCUMENT:                        break LOOP;                }                type = pp.next();            } while(pp.getDepth() > level);        } catch (XmlPullParserException ex)  {            final SAXParseException saxException = new SAXParseException("parsing error: "+ex, this, ex);            ex.printStackTrace();            errorHandler.fatalError(saxException);        }    }