@Override public void endElement(String uri, String localName, String qName) throws SAXException { String currentNode = this.elementStack.pop(); // if the node popped from the stack and the localName don't match, the xml document is improperly formatted if (!localName.equals(currentNode)) { throw new SAXException(SR.INVALID_RESPONSE_RECEIVED); } if (USAGE_NAME.equals(currentNode)) { this.stats.setUsage(Integer.parseInt(this.builder.toString())); } this.builder = new StringBuilder(); }
@Override public void endElement(String uri, String localName, String qName) throws SAXException { String currentNode = this.elementStack.pop(); // if the node popped from the stack and the localName don't match, the xml document is improperly formatted if (!localName.equals(currentNode)) { throw new SAXException(SR.INVALID_RESPONSE_RECEIVED); } if (USAGE_NAME.equals(currentNode)) { this.stats.setUsage(Integer.parseInt(this.builder.toString())); } this.builder = new StringBuilder(); }