lundi 13 février 2017

How to create Class and object from xml on the flight?

I have a XML file with the following structure:

<object type="People">
    <field id="name" type="class java.lang.String" value="Ivan"/>
    <field id="age" type="class java.lang.Integer" value="23"/>
    <field id="salary" type="double" value="50.0"/>
</object>

But the object type, and fields can be differ

Is it possible to create object from XML with unknown field?





Aucun commentaire:

Enregistrer un commentaire