XStream Aliasing- XStream Package Aliasing - XStream

What is the use of XStream Package Aliasing?

Package aliasing is used for creating an alias of a fully qualified name of a class in XML to a new qualified name. Let’s modify the example again and change below code.

Above code is changed as follows:

Let us test the above object's serialization using XStream.

Create a java class file named XStreamTester in C:\>XStream_WORKSPACE\com\wisdomjobs\xstream.

File: XStreamTester.java

Verify the Result

Compile the classes using javac compiler as follows:

Now run the XStreamTester to see the result:

Verify the output as follows:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XStream Topics