SimpleFramework XML – Parsing object with different data types to XML in Kotlin

I’m trying to use simpleXML to serialize a Kotlin object to XML. The resulting XML should look something like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>   <ns:objectA xmlns:ns="http://example-namespace.com">     <value><key>firstobject</key><int>1</int></value>     <value><key>secondobject</key><int>227</int></value>     <value><key>thirdobject</key><dateTime>DUMMY_DATE_TIME</dateTime></value>   </ns:objectA> 

How should the Kotlin object look like? Especially the Value object.

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.