code: public static synchronized XMLEventReader createStringReader(final String paramString)
          throws IOException, XMLStreamException {
          final XMLInputFactory factory = XMLInputFactory.newInstance();
          factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
          final InputStream in = new ByteArrayInputStream(paramString.getBytes());
          return factory.createXMLEventReader(in);
      }
docs: Create a new StAX reader on a string.
  
  @param paramString
  the XML file as a string to parse
  @return an {@link XMLEventReader}
  @throws IOException
  if I/O operation fails
  @throws XMLStreamException
  if any parsing error occurs