title: XML Parsing: MismatchedInputException: Cannot construct instance of `A` (although at least one Creator exists)
body: <p>I'm using a <a href="https://github.com/carlanton/mpd-tools" rel="nofollow noreferrer">third-party library</a> to parse a manifest MPD (for DASH video streaming) but, during the parsing process, I get a MismatchedInputException while parsing the XML into objects. The Manifest can be found in <a href="https://live.unified-streaming.com/scte35/scte35.isml/.mpd?restart_tv?t=2019-09-16T17:00:00.000Z" rel="nofollow noreferrer">this URL</a> (is a live streaming manifest).</p>
  
  <p>The error shown is the one that follows:</p>
  
  <pre><code>com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `io.lindstrom.mpd.data.descriptor.Scope` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
   at [Source: (StringReader); line: 17, column: 5] (through reference chain: io.lindstrom.mpd.data.MPD["ServiceDescription"]-&gt;io.lindstrom.mpd.data.descriptor.ServiceDescription["Scope"])
      at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) ~[jackson-databind-2.9.0.jar:2.9.0]
      at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1329) ~[jackson-databind-2.9.0.jar:2.9.0]
  </code></pre>
  
  <p>Now, some context.</p>
  
  <p>From that same manifest, the Tag "ServiceDescription" looks like this (I cant change it)</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;ServiceDescription id="1"&gt;
      &lt;Scope
        schemeIdUri="urn:dvb:dash:lowlatency:scope:2019" /&gt;
      &lt;Latency
        target="2000"
        max="6000"
        min="1000" /&gt;
      &lt;PlaybackRate
        max="1.5"
        min="0.5" /&gt;
    &lt;/ServiceDescription&gt;
  </code></pre>
  
  <p>The Scope code is defined like this:</p>
  
  <pre><code>import javax.xml.bind.annotation.XmlAttribute;
  
  public class Scope {
  
    @XmlAttribute(name = "schemeIdUri")
    private String schemeIdUri;
  
    public Scope(String schemeIdUri) {
      this.schemeIdUri = schemeIdUri;
    }
  
    public String getSchemeIdUri() {
      return schemeIdUri;
    }
  
    public void setSchemeIdUri(String schemeIdUri) {
      this.schemeIdUri = schemeIdUri;
    }
  }
  </code></pre>
  
  <p>The class that contains "The Scope" is defined as follows. I change the tag that defines it to @XmlElement, @XmlAttribute and it doesn't give me any different result:</p>
  
  <pre class="lang-java prettyprint-override"><code>package io.lindstrom.mpd.data.descriptor;
  
  import java.util.Objects;
  import javax.xml.bind.annotation.XmlAttribute;
  import javax.xml.bind.annotation.XmlType;
  
  @XmlType(propOrder = {
      "id",
      "scope",
      "any",
      "any"
  })
  
  public class ServiceDescription {
  
    @XmlAttribute(name = "id")
    private String id;
  
    @XmlAttribute(name = "Scope")
    private Scope scope;
  
    @XmlAttribute(name = "Latency")
    private Latency latency;
  
    @XmlAttribute(name = "PlaybackRate")
    private PlaybackRate playbackRate;
  
    public ServiceDescription(String id, Scope scope, Latency latency,
        PlaybackRate playbackRate) {
      this.id = id;
      this.scope = scope;
      this.latency = latency;
      this.playbackRate = playbackRate;
    }
  
    public ServiceDescription() {
      this.id = null;
      this.scope = null;
      this.latency = null;
    }
  
    public String getId() {
      return id;
    }
  
    public void setId(String id) {
      this.id = id;
    }
  
    public Scope getScope() {
      return scope;
    }
  
    public void setScope(Scope scope) {
      this.scope = scope;
    }
  
    public Latency getLatency() {
      return latency;
    }
  
    public void setLatency(Latency latency) {
      this.latency = latency;
    }
  
    public PlaybackRate getPlaybackRate() {
      return playbackRate;
    }
  
    public void setPlaybackRate(PlaybackRate playbackRate) {
      this.playbackRate = playbackRate;
    }
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      ServiceDescription that = (ServiceDescription) o;
      return id == that.id &amp;&amp;
          scope.equals(that.scope) &amp;&amp;
          latency.equals(that.latency) &amp;&amp;
          playbackRate.equals(that.playbackRate);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(id, scope, latency, playbackRate);
    }
  
    public final class Builder {
  
      private String id;
      private Scope scope;
      private Latency latency;
      private PlaybackRate playbackRate;
  
      public Builder withId(String id) {
        this.id = id;
        return this;
      }
  
      public Builder withScope(Scope scope) {
        this.scope = scope;
        return this;
      }
  
      public Builder withLatency(Latency latency) {
        this.latency = latency;
        return this;
      }
  
      public Builder withPlaybackRate(PlaybackRate playbackRate) {
        this.playbackRate = playbackRate;
        return this;
      }
  
      public ServiceDescription build() {
        ServiceDescription serviceDescription = new ServiceDescription();
        serviceDescription.setId(id);
        serviceDescription.setScope(scope);
        serviceDescription.setLatency(latency);
        serviceDescription.setPlaybackRate(playbackRate);
        return serviceDescription;
      }
    }
  
  }
  
  </code></pre>