The xml file comes to the server:

<property name="some name"> <property name="some name"></property> <property name="some name"></property> <property name="some name"></property> <property name="some name"></property> </property> <property name="some name"></property> <property name="some name"></property> <property name="some name"></property> <property name="some name"></property> <property name="some name"></property> <property name="some name"></property> 

How should the java-object look in this case? And how correct is XML?

  • And what do you want to be answered? That piece of xml that you showed, more precisely, HOW you showed it, says a little less than nothing - rjhdby
  • Yes, give some example. If in Java, then XML can be parsed by creating a model and then unzipped - Egor

1 answer 1

  1. The java object or class must contain all the properties specified in the xml scheme.
  2. An object can contain only a portion of the data that comes in the xml document. And then you need to parse it, extrude data and assign the appropriate fields of your class.
  3. Your example and question is not very informative.
  • Thanks for the comment. This is a test task for the device to work and it describes that this xml file will be sent to the server. Apparently, it is necessary to fantasize a little with the fields and values ​​.... - Iosif Serbskiy
  • one
    You need to understand what XML, JAXB, parsers are ..... and then these questions will disappear by themselves. - scalalaz
  • Already understand) - Iosif Serbskiy