Skip to content

Tag: xmlmapper

xmlMapper allow to use any root element during deserialization

I have such code It works fine, but in xmlString I can use any root tag name and my code still will work. For example String xmlString = “<x><plainPassword>12345</plainPassword></x>”; where I use x as root element also works. But is it possible to say xmlMapper that it could correctly deserialize only strings with “password” root element? Answer Unfortunately, the behavior