I've seen many times xml in rest web services, having 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 this:
<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>
The answer to your first question is simple: ATOM is a solid standard that covers a bunch of standard things that you want to do for publishing, updating, and otherwise managing information.
So, people use ATOM for the same reason they use HTTP - they could invest something unique, but the standard gives them better tools.
To the second, various Java libraries exist, but there is no definitive way to do this. Everything from "write your own model objects and hand-parse the XML" through to the sort of "do it for you" libraries that question links to will work just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With