title: XML schema to Java pojos to json
body: <p>I'm generating a Java class hierarchy from a complicated xml schema. The content stored in xml (returned via a REST endpoint) is verbose, plus consumers want only subsets of the xml content returned as json (that they define). </p>
  
  <p>I know there are brute force ways to accomplish this, but does anyone know of a more elegant approach? Maybe some kind of mapping that the consumer could pass to the service that would allow them to dynamically select the content (via xpath in the mapping) and also produce custom json wrapping that content?</p>
  
  <p>The consumers will have an understanding of the schema and content structure, but nothing about Java or its object hierarchy.</p>
  
  <p>I know, a lot here. Any suggestions?</p>