title: JAXB unmarshalling error: Expected elements are <{ } Root>
body: <p>I'm reusing existing objects generated elsewhere to unmarshall XML data coming in as a String type.</p>
  
  <p>The object:</p>
  
  <pre><code>/*  3:   */ import java.util.ArrayList;
  /*  4:   */ import java.util.List;
  /*  5:   */ import javax.xml.bind.annotation.XmlAccessType;
  /*  6:   */ import javax.xml.bind.annotation.XmlAccessorType;
  /*  7:   */ import javax.xml.bind.annotation.XmlElement;
  /*  8:   */ import javax.xml.bind.annotation.XmlRootElement;
  /*  9:   */ import javax.xml.bind.annotation.XmlType;
  /* 10:   */ 
  /* 11:   */ @XmlAccessorType(XmlAccessType.FIELD)
  /* 12:   */ @XmlType(name="", propOrder={"policy"})
  /* 13:   */ @XmlRootElement(name="MyNodeResponse")
  /* 14:   */ public class MyNodeResponse
  /* 15:   */ {
  /* 16:   */   @XmlElement(name="Policy")
  /* 17:   */   protected List&lt;Policy&gt; policy;
  /* 18:   */   
  /* 19:   */   public List&lt;Policy&gt; getPolicy()
  /* 20:   */   {
  /* 21:65 */     if (this.policy == null) {
  /* 22:66 */       this.policy = new ArrayList();
  /* 23:   */     }
  /* 24:68 */     return this.policy;
  /* 25:   */   }
  /* 26:   */ }
  </code></pre>
  
  <p>My unmarshalling code:</p>
  
  <pre><code>JAXBContext jc = JAXBContext.newInstance(MyNodeResponse.class); 
  Unmarshaller unmarshaller = jc.createUnmarshaller();
  MyNodeResponse myNodeResponse = (MyNodeResponse)unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(xmlStringInput.getBytes("utf-8"))));
  </code></pre>
  
  <p>My input XML:</p>
  
  <pre><code>&lt;ns2:MyNodeResponse 
           xmlns:ns2="mynamespace/2010/10"&gt;   
     &lt;ns2:Policy&gt;
     ....more data....
     &lt;ns2:Policy/&gt;
  &lt;ns2:MyNodeResponse /&gt;
  </code></pre>
  
  <p>I get the following error when unmarshalling:</p>
  
  <pre><code>unexpected element (uri:"mynamespace/2010/10", local:"MyNodeResponse"). Expected elements are &lt;{}MyNodeResponse&gt;
  </code></pre>
  
  <p>What exactly does the "{ }" refer to in the error, and how do I unmarshall in a way to match what is present in the input XML and how the object is expecting?</p>