title: How to make JAXB unmarshaller to ignore prefixes?
body: <p>I have the following XML:</p>
  
  <pre><code>&lt;ns2:Person name="John" age="20" /&gt;
  </code></pre>
  
  <p>And I want to unmarshal it to JAXB object Person which was generated from the XSD.</p>
  
  <p>this is the code I'm running:</p>
  
  <pre><code>JAXBContext context = JAXBContext.newInstance(PersoEntity.class);
  Unmarshaller um = context.createUnmarshaller();
  StringReader sr = new StringReader(xml);
  Person p = (Person)um.unmarshal(sr);
  </code></pre>
  
  <p>Surprisingly I get the following exception:</p>
  
  <pre><code>javax.xml.bind.UnmarshalException
   - with linked exception:
  [org.xml.sax.SAXParseException: The prefix "ns2" for element "ns2:Person" is not bound.]
  </code></pre>
  
  <p>How do I solve it? Thanks</p>