public void endElement()

in elb/src/main/java/org/jclouds/elb/xml/PolicyHandler.java [56:74]


   public void endElement(String uri, String name, String qName) throws SAXException {
      if (equalsOrSuffix(qName, "PolicyName")) {
         builder.name(currentOrNull(currentText));
      } else if (equalsOrSuffix(qName, "PolicyTypeName")) {
         builder.typeName(currentOrNull(currentText));
      } else if (equalsOrSuffix(qName, "AttributeName")) {
         key = currentOrNull(currentText);
      } else if (equalsOrSuffix(qName, "AttributeValue") && key != null) {
         String value = currentOrNull(currentText);
         if ("true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value))
            builder.attribute(key, Boolean.valueOf(value));
         else if (Ints.tryParse(value) != null)
            builder.attribute(key, Long.valueOf(value));
         else
            builder.attribute(key, value);
         key = null;
      }
      currentText.setLength(0);
   }