Browse Prior Art Database

Automated Java Serialisation using XML Disclosure Number: IPCOM000027938D
Publication Date: 2004-Apr-13
Document File: 3 page(s) / 9K

Publishing Venue

The Prior Art Database



This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 58% of the total text.

Page 1 of 3

Automated Java Serialisation using XML

XML is an increasingly popular way of storing data. There are some situations where it is necessary to have a Java representation of XML encapsulated data. This proposal describes a method of translating data stored in a Java class to and from XML.

For example

<?xml version="1.0" encoding="UTF-8"?> <rights:RightsInformation

xmlns:rights="" xmlns:sig="" xmlns=" -instance" schemaLocation=" shareit-rights.xsd">






<rights:Description>BBC entitlement from UK television licence </rights:Description>




Example XML document The information contained in the above XML document could be represented in Java using the following class:

public class GAT{

protected String contentSetID;

protected String peerID;

protected String contentRightsDistributor;

protected String ticketIssuer;

protected Date expiry;

protected Integer serialNumber;

protected String description;

public String getContentSetID(){

return contentSetID;


public void setContentSetID(String id){



public String getPeerID(){

return peerID;


public void setPeerID(String id){



public String getContentRightsDistributor(){

return contentRightsDistributor;


Page 2 of 3

public void setContentRightsDistributor(String distributor){



public String getTicketIssuer(){

return ticketIssuer;


public void setTicketIssuer(String issuer){



public Date getExpiry(){

return expiry;


public void setExpiry(Date date){



public Integer getSerialNumber(){

return serialNumber;


Example Java Class

The problem that this proposal aims to solve, is "how to convert between the Java and the XML representation?"

The Java language has a feature called serialisation, which can be used to convert the contents of a Java class to a binary form. The disadvantage of this binary form is that neither is it easy to edit, nor very portable. Java serialised data is not portable between Java virtual machines. It is also not portable between changes...