title: Deserializing xml namespaces with Jackson & Kotlin
body: <p>I have a xml element with 2 namespaces, and I'm not able to read them with jackson.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Person xmlns="http://some.namespace.com" xmlns:ns0="http://some.other.namespace.com"&gt;
      &lt;name&gt;John&lt;/name&gt;
  &lt;/Person&gt;
  </code></pre>
  
  <pre><code>internal data class Person(
      val name: String,
      @get:JacksonXmlProperty(isAttribute = true)
      val xmlns: String,
      @get:JacksonXmlProperty(isAttribute = true, localName="xmlns:ns0")
      val ns0: String
  )
  </code></pre>
  
  <p>When reading the XML with jackson, I get an error saying that both namespaces should be nullable.</p>
  
  <p>I've tried with some variants like attrs in the body of the class and with the namespace attribute, like</p>
  
  <pre><code>    @JacksonXmlProperty(isAttribute = true, localName = "ns0", namespace = "xmlns")
      var ns0: String? = null
  </code></pre>
  
  <p>This is the mapper I'm using</p>
  
  <pre><code>val mapper: XmlMapper = XmlMapper().apply {
          registerModule(KotlinModule())
          setSerializationInclusion(JsonInclude.Include.NON_NULL)
      }
  </code></pre>
  
  <p>How can I read and write again this xml and make them identical?</p>