title: JAXB: How to bind element with namespace
body: <p>He is my XML hosted on remote machine:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;store xmlns="http://mydomain.com/store/schemas"&gt;
      &lt;!-- My Book store--&gt;
      &lt;book location="vk 1"&gt;
          &lt;title&gt;Learning JAXB&lt;/title&gt;
          &lt;author&gt;Joe Blogg&lt;/author&gt;
      &lt;/book&gt;
      &lt;book location="vk 1"&gt;
          &lt;title&gt;Learning JAXB SE&lt;/title&gt;
          &lt;author&gt;Joe Blogg&lt;/author&gt;
      &lt;/book&gt;
  &lt;/store&gt;
  </code></pre>
  
  <p>I have bind book as follows:</p>
  
  <p><strong>Book Binding:</strong></p>
  
  <pre><code>@XmlRootElement(name = "book")
  @XmlType(propOrder = { "title", "author"})
  public class Book
  {
   private String title;
   private String author;
   private String location;
  
   @XmlElement(name = "title")
   public String getTitle()
   {
    return title;
   }
  
   public void setTitle(String title)
   {
    this.title=title;
   }
  
   @XmlAttribute(name = "location")
   public String getLocation()
   {
    return location;
   }
  
   public void setLocation(String location)
   {
    this.location = location;
   }
  
   @XmlElement(name = "author")
   public String getAuthor()
   {
    return author;
   }
  
   public void setAuthor(String author)
   {
    this.author = author;
   }
  }
  </code></pre>
  
  <p><strong>Store Binding:</strong></p>
  
  <pre><code>@XmlRootElement(name = "store", namespace = "http://mydomain.com/store/schemas")
  public class Store
  {
   private List&lt;Book&gt; books;
  
    @XmlElement(name="book")
    public List&lt;Book&gt; getBooks()
    {
      return books;
    }
  
    public void setBooks(List&lt;Book&gt; books)
    {
      this.books= books;
    }
  }
  </code></pre>
  
  <p>I am unmarshalling the <code>XML</code> file as fAollows:</p>
  
  <pre><code>  JAXBContext context = JAXBContext.newInstance(Store.class);
    Unmarshaller unmarshaller = context.createUnmarshaller();
    URL url = new URL("http://mydomain/files/store.xml");
    Store s= (Store) unmarshaller.unmarshal(url);
    System.out.println(s.getBooks());// Prints null
  </code></pre>
  
  <p>When I call <code>getBooks()</code> we get null value. Can anyone spot what I am doing wrong here?!</p>