Last active
February 11, 2016 09:44
-
-
Save KomanRudden/e4939be51330d0270a3e to your computer and use it in GitHub Desktop.
Parsing from XML to JAXB object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JAXBContext jaxbContext = JAXBContext.newInstance(<theObject>.class); | |
| Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); | |
| StringReader reader = new StringReader(<thingToMarshall>); | |
| <theObject> root = (<theObject>) unmarshaller.unmarshal(reader); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment