code: public static XMLStreamException invalidAttributeValue(final XMLStreamReader reader, final int index) {
          return new XMLStreamException("Invalid value '" + reader.getAttributeValue(index) + "' for attribute '"
                  + reader.getAttributeName(index) + "'", reader.getLocation());
      }
docs: Get an exception reporting an invalid XML attribute value.
  @param reader the stream reader
  @param index the attribute index
  @return the exception