code: public static boolean readBooleanAttributeElement(final XMLExtendedStreamReader reader, final String attributeName)
              throws XMLStreamException {
          requireSingleAttribute(reader, attributeName);
          final boolean value = Boolean.parseBoolean(reader.getAttributeValue(0));
          requireNoContent(reader);
          return value;
      }
docs: Read an element which contains only a single boolean attribute.
  @param reader the reader
  @param attributeName the attribute name, usually "value"
  @return the boolean value
  @throws javax.xml.stream.XMLStreamException if an error occurs or if the
  element does not contain the specified attribute, contains other
  attributes, or contains child elements.