Response title
This is preview!




Click on Join Now to Sign Up

config
=
(AppConfig)
context.createUnmarshaller().unmarshal(createInput("config.xml"));
createInput() makes an InputStream. What is nice with Java is that you can make an InputStream from a string, too. Try:
config
=
(AppConfig)
context.createUnmarshaller().unmarshal(new ByteArrayInputStream(yourXMLText.getBytes()));
(untested)