edu.nrao.sss.xml
Class XMLTransform

java.lang.Object
  extended by edu.nrao.sss.xml.XMLTransform

public class XMLTransform
extends Object

Class composed of static methods that encode or decode the five meta XML characters.

Author:
stephan

Constructor Summary
XMLTransform()
           
 
Method Summary
static String dateToXMLDateTime(Date date)
          Format a date as a standard XML DateTime.
static String decode(String in)
          Decode a String, that is, unescape any occurence of one of the five encoded meta characters.
static String encode(String in)
          Encode a String, that is, transform it so the five XML meta characters are escaped properly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLTransform

public XMLTransform()
Method Detail

encode

public static String encode(String in)
Encode a String, that is, transform it so the five XML meta characters are escaped properly.

Parameters:
in - the String to encode
Returns:
the resulting encoded String, null if the input String was

decode

public static String decode(String in)
Decode a String, that is, unescape any occurence of one of the five encoded meta characters.

Parameters:
in - the String to decode
Returns:
the resulting decoded String, null if the input String was null

dateToXMLDateTime

public static String dateToXMLDateTime(Date date)
Format a date as a standard XML DateTime.

Parameters:
date - the date to be formatted.
Returns:
date formatted as a standard XML DateTime.


Copyright © 2009. All Rights Reserved.