You could do this with JAXB (an implementation is included in Java SE 6).
import java.io.StringReader;
import javax.xml.bind.*;
import javax.xml.transform.stream.StreamSource;
public class Demo {
public static void main(String[] args) throws Exception {
String xmlString = "<message>HELLO!</message> ";
JAXBContext jc = JAXBContext.newInstance(String.class);
Unmarshaller unmarshaller = jc.createUnmarshaller();
StreamSource xmlSource = new StreamSource(new StringReader(xmlString));
JAXBElement<String> je = unmarshaller.unmarshal(xmlSource, String.class);
System.out.println(je.getValue());
}
}
Output
HELLO!