0

I have XML file provide with contact inside , and some time look like->

<ResponsableContact>test test(test.test@test.com<test.test@test.com>)</ResponsableContact>

but when i try to convert my XMLFile with JAXB it generate error

javax.xml.bind.UnmarshalException

  • with linked exception: [org.xml.sax.SAXParseException; lineNumber: 1128; columnNumber: 88; Le type d'élément [email].... doit être suivi des spécifications d'attribut, ">" ou "/>".]
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "ListeXML")
public class ListeXML{
    
    private String dateDeGeneration;
...
    private List<Dom> listeDom;
    
    public ListeXML() {
        super();
    };
}
@Entity
@XmlAccessorType(XmlAccessType.FIELD)
public class Dom {
    
    @Id
    private String id;
    ...
    @XmlTransient
    private String responsableContact;

}

How ignore this element type is not real xml type ?

I can't change the XML file beacause it generate by the one else

kiki keke
  • 99
  • 2
  • 10

0 Answers0