Esempio n. 1
0
 @Override
 public void startElement(String uri, String localName, String qName, Attributes attrs)
     throws SAXException {
   if (qName.equals("key")) {
     response.setAccessMask(getLong(attrs, "accessMask"));
     response.setType(KeyType.valueOf(getString(attrs, "type")));
     String expires = attrs.getValue("expires").trim();
     if (expires.length() > 0) response.setExpires(getDate(expires));
   } else if (qName.equals("row")) {
     EveCharacter character = new EveCharacter();
     character.setCharacterID(getLong(attrs, "characterID"));
     character.setName(getString(attrs, "characterName"));
     character.setCorporationID(getLong(attrs, "corporationID"));
     character.setCorporationName(getString(attrs, "corporationName"));
     response.addEveCharacter(character);
   }
   super.startElement(uri, localName, qName, attrs);
   accumulator.setLength(0);
 }
Esempio n. 2
0
 @Override
 public void startDocument() throws SAXException {
   response = new CharacterInfoResponse();
   super.startDocument();
 }