@Override public void startElement( final String uri, final String localName, final String qName, final Attributes attributes) throws SAXException { super.startElement(uri, localName, qName, attributes); if (localName.equals("comments")) { mComments = new ArrayList<Comment>(); } else if (localName.equals("comment")) { mComment = new Comment(); } }
@Override public void endElement(final String uri, final String localName, final String qName) throws SAXException { super.endElement(uri, localName, qName); if (mComment != null) { mComment.parseAttribute(localName, mTextNode.toString()); } if (localName.equals("comment")) { if (mComments != null && mComment != null) { mComments.add(mComment); } } }