public synchronized static <T>T unmarshal(String content,Class<T> tClass){
  StringReader stringReader=new StringReader(content);
  try {
    JAXBContext context=JAXBContext.newInstance(tClass);
    Unmarshaller unMarshaller=context.createUnmarshaller();
    return tClass.cast(unMarshaller.unmarshal(stringReader));
  }
 catch (  JAXBException je) {
    _log.error("Unable to parse XML content.",je);
  }
  return null;
}

public synchronized static < T > T unmarshal ( String content , Class < T > tClass ) { StringReader stringReader = new StringReader ( content ) ; try { JAXBContext context = JAXBContext . newInstance ( tClass ) ; Unmarshaller unMarshaller = context . createUnmarshaller ( ) ; return tClass . cast ( unMarshaller . unmarshal ( stringReader ) ) ; } catch ( JAXBException je ) { _log . error ( "Unable to parse XML content." , je ) ; } return null ; }
general method to parse xml content
