title: Spring Boot XML element with attribute and content
body: <p>How to generate below XML from Java class i.e XML element with attribute and content</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;bookstore&gt;
      &lt;book category="gaming"&gt;
          &lt;author&gt;Pratap A K&lt;/author&gt;
          &lt;price&gt;100र&lt;/price&gt;
          &lt;title lang="en"&gt;some title&lt;/title&gt;
          &lt;year&gt;2017&lt;/year&gt;
      &lt;/book&gt;
  &lt;/bookstore&gt;
  </code></pre>
  
  <p><strong>Controller.java</strong></p>
  
  <pre><code>@RequestMapping(value = "/xml", method = RequestMethod.GET, produces = MediaType.APPLICATION_XML_VALUE)
      @ResponseStatus(HttpStatus.OK)
      @ResponseBody
      public Bookstore getXMLData() {
  
          Bookstore bookstore = new Bookstore();
          Book book = new Book();
  
          book.setCategory("gaming");
          book.setAuthor("Pratap A K");
          book.setPrice("100र");
          book.setYear("2017");
  
          Title title = new Title();
          title.setLang("kannada");
          book.setTitle(title);
  
          bookstore.setBook(book);
  
          return bookstore;
      }
  </code></pre>
  
  <p><strong>Bookstore.java</strong></p>
  
  <pre><code>@XmlRootElement(name="bookstore")
  public class Bookstore {
  
      private Book book;
      //getters and setters   
  }
  </code></pre>
  
  <p><strong>Book.java</strong></p>
  
  <pre><code>public class Book {
  
      private String category;
      private String author;
      private String year;
      private String price;
      private String lang;
      private Title title;
  
      @XmlAttribute(name="category")
      public String getCategory() {
          return category;
      }
      //getters and setters continue...
  
  }
  </code></pre>
  
  <p><strong>Title.java</strong></p>
  
  <pre><code>public class Title {
  
      private String lang;
  
      @XmlAttribute(name="lang")
      public String getLang() {
          return lang;
      }
  
      public void setLang(String lang) {
          this.lang = lang;
      }
  }
  </code></pre>
  
  <p>I am getting output as below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;bookstore&gt;
      &lt;book category="gaming"&gt;
          &lt;author&gt;Pratap A K&lt;/author&gt;
          &lt;price&gt;100र&lt;/price&gt;
          &lt;title lang="en"/&gt;
          &lt;year&gt;2017&lt;/year&gt;
      &lt;/book&gt;
  &lt;/bookstore&gt;
  </code></pre>
  
  <p>Now How can I set title whithout using any extra tags / member variable in Java class?</p>
  
  <p>Thanks in advance</p>