JAXB: Comment puis-je unmarshal XML sans espaces de noms

J'ai un fichier XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object>
   <str>the type</str>
   <bool type="boolean">true</bool>        
</object>

Et je veux unmarshal à un objet de la classe ci-dessous

@XmlRootElement(name="object")
public class Spec  {
   public String str;
   public Object bool;

}

Comment puis-je faire cela? À moins que je spécifier les espaces de noms (voir ci-dessous), il ne fonctionne pas.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object>
   <str>the type</str>
   <bool xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   
       xmlns:xs="http://www.w3.org/2001/XMLSchema"  
       xsi:type="xs:boolean">true</bool>        
</object>

OriginalL'auteur Andrey | 2011-08-25