XStream Tutorial


XStream Tutorial

XStream is a simple Java-based library to serialize Java objects to XML and vice versa. This is a brief tutorial that adopts a simple and intuitive way to explain the basic features of XStream library and how to use them.

Audience

This tutorial has been prepared to suit the requirements of Java developers who would like to understand the basics of XStream library and use it in their Java programs.

Prerequisites

Since XStream is a Java-based library, you need to have a clear understanding of Java programming in order to make use of this library.

Execute XStream Online

For most of the examples given in this tutorial, you will find a 'Try it' option, which you can use to execute your Java programs at the spot and enjoy your learning.

try the following example using the 'Try it' option available at the top right corner of the following sample code box −

public class MyFirstJavaProgram {

  public static void main(String []args) {
     System.out.println("Hello World");
  }
} 


Advertisements