Create JAXBElement<Book> from String

Kamapporn

New Member
I have a class Book defined and I want to create a JAXBElement object that will contain the information corresponding to the XML from the String object.For example, I can have something like:\[code\]String code = "<book><title>Harry Potter</title></book>";\[/code\]Now, I want to create a JAXBElement, starting from that string. I need the string to do some validations that I cannot do using JAXBElement.So, can I do what I want? If yes, how?Thanks!Sorin
 
Back
Top