Why do we use atoms alone?

I have seen xml many times in leisure web services in the following format:

<author> <atom:link rel="author" type="application/xml" href="http://www.../author/1"/> </author> 

and the URL (http: //www.../author/1) will contain something like the following:

 <author xmlns="http://www.../ckp" xmlns:atom="http://www.w3.org/2005/atom"> <name>S. Crocker</name> <address>None</address> <affiliation></affiliation> <email>None</email> </author> 
  • I was wondering why the first xml form is used?
  • How can they be modeled on a java model class (using the mvc template)?
+6
source share
1 answer

The answer to your first question is simple: ATOM is a solid standard that covers the bunch of standard that you want to do to publish, update and manage information in a different way.

Thus, people use ATOM for the same reason as HTTP, they can invest something unique, but the standard gives them better tools.

Secondly, there are various Java libraries , but there is no definitive way to do this. Everything from “writing your own model objects and manually parsing XML” to “do it for you” type, the linked libraries will work fine.

+1
source

Source: https://habr.com/ru/post/914982/


All Articles