XML serialization in Java?

Dmitry Shechtman picture Dmitry Shechtman · Aug 30, 2008 · Viewed 138k times · Source

What is the Java analogue of .NET's XML serialization?

Answer

Cheekysoft picture Cheekysoft · Aug 30, 2008

2008 Answer The "Official" Java API for this is now JAXB - Java API for XML Binding. See Tutorial by Oracle. The reference implementation lives at http://jaxb.java.net/

2018 Update Note that the Java EE and CORBA Modules are deprecated in SE in JDK9 and to be removed from SE in JDK11. Therefore, to use JAXB it will either need to be in your existing enterprise class environment bundled by your e.g. app server, or you will need to bring it in manually.